Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

fix build error #2

Closed
wants to merge 1 commit into from
Closed

fix build error #2

wants to merge 1 commit into from

Conversation

chishiro
Copy link
Contributor

@chishiro chishiro commented Nov 6, 2018

I fix the build error in the following environments.

  • Linux 4.15.0 (Ubuntu 18.04)
  • GCC 7.3

Please review my code.
The build error is caused by uninitiailized local values and undefined references.
Note that the modification of include/lego/log2.h may generate a build error in your environment.

@lastweek lastweek self-requested a review November 6, 2018 15:09
@lastweek lastweek self-assigned this Nov 6, 2018
@lastweek lastweek added the enhancement New feature or request label Nov 6, 2018
@lastweek
Copy link
Contributor

lastweek commented Nov 6, 2018

Hi @chishiro,

Thank you for trying out LegoOS. I took a quick look at the changes you made, I think some of them are valid, while some of them are "complains" from high version GCC. I will try it out today.

lastweek pushed a commit that referenced this pull request Nov 7, 2018
We merge the compile error fix, which is described
by pull request: #2

Higher version gcc catches several uninitialized local variables.
Some of the affected code is dead code.
lastweek pushed a commit that referenced this pull request Nov 7, 2018
We merge the compile error fix, which is described by pull request 2:
	#2

Higher version gcc catches several uninitialized alocal variables.
Some of the affected code is dead code.

ilog_NaN may not work with high version GCC. So we reframe ilog2 a
little bit.
@lastweek
Copy link
Contributor

lastweek commented Nov 7, 2018

@chishiro

I made some changes and merged most of your changes.

I changed two things:

  1. https://github.com/WukLab/LegoOS/pull/2/files#diff-de7b6c637e64ef9d84f54ebadceb5ec3R1566,
    I changed to use memset
  2. I reframed ilog2 and remove the NaN all along.

This complies with my platform. Not sure if gcc 7.4 will work. Let me know how it goes.

@chishiro
Copy link
Contributor Author

chishiro commented Nov 7, 2018

@lastweek
I agree your change.
GCC 7.4 has not been released yet.
If GCC 7.4 is released, I will try it.

@chishiro chishiro closed this Nov 7, 2018
@lastweek
Copy link
Contributor

lastweek commented Nov 7, 2018

Sorry, I meant 7.3, the one you are using.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants