New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile.cflags: Build with -Wall -Werror by default (including fixes to correct all existing warnings) #3319
Conversation
@@ -46,7 +46,7 @@ void cortexm_init(void) | |||
/* set SVC interrupt to same priority as the rest */ | |||
NVIC_SetPriority(SVCall_IRQn, CPU_DEFAULT_IRQ_PRIO); | |||
/* initialize all vendor specific interrupts with the same value */ | |||
for (int i = 0; i < CPU_IRQ_NUMOF; i++) { | |||
NVIC_SetPriority(i, CPU_DEFAULT_IRQ_PRIO); | |||
for (int i = 0; i < (int) CPU_IRQ_NUMOF; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/int i/IRQn_Type i/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
Added -Wall -Werror as an experiment, waiting for Travis. |
59e1aae
to
414de24
Compare
Added a whole bunch of fixes. Interesting parts:
|
414de24
to
2618e64
Compare
there's a problem with the qemu-i386 port and PRId64 being defined as |
Awesome work! Thanks a lot!
Which toolchain script are you referring to? |
@OlegHahm I was referring to the script in
I think the problem would be solved by an upgrade to newlib-2.2.0, which has some updates for the PRI* macros. |
@Kijewski, can you shed some light on this? |
Yes, the changes are:
|
nevermind my comment about newlib versions. When supplying What is the correct procedure here? Should newlib's includes be added before GCC's on the command line? Is it possible to build a QEMU kernel without |
Right after I posted my last comment I found this mailing list post: http://comments.gmane.org/gmane.comp.lib.newlib/9373 (The change discussed in the post is included in newlib 2.2.0, but not in newlib 2.1.0) |
Might need an even newer newlib: |
2618e64
to
59668a1
Compare
Rebased on latest master.
See https://sourceware.org/ml/newlib-cvs/2015-q2/msg00001.html The qemu-i386 tests work now if I replace the files in |
@@ -51,13 +50,13 @@ extern "C" { | |||
* Should be divisible through 2 (For ETX_DEF_JIT_CORRECT) | |||
* and 5 (For ETX_MAX_JITTER) unless those values are adjusted too. | |||
*/ | |||
#define ETX_INTERVAL (1000) | |||
#define ETX_INTERVAL (1000ul) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not replacing with MS_IN_USEC
while you're at it anyway?
Fixes warnings about wrong function signature.
bd931db
to
235b9b3
Compare
squashed, waiting for Travis |
Makefile.cflags: Build with -Wall -Werror by default (including fixes to correct all existing warnings)
Woohoo! |
This broke building for OS X and FreeBSD. Again 😢 |
Sorry about that! |
@thomaseichinger is FreeBSD and OSX sufficiently similar to assume that any build fixes for FreeBSD usually gets it working on OSX as well? |
No, sadly not. |
It's about time, that Millhouse (Mac@FU) and Stedten (FreeBSD@FU) are included in the build tests :D |
I fear we wont fix this for OS X, as the used |
@thomaseichinger we could add an |
I'm on it. |
@thomaseichinger does |
@gebart I went with |
Fixes a lot of warnings. This is a stepping stone towards #1121.
make buildtest
withCFLAGS += -Wall -Werror
(not-Wextra
) added toMakefile.include
now completes without errors onall testsexamples/hello-world
,examples/default
,examples/rpl_udp
,tests/unittests
Worth extra notice:
CFLAGS += -Wextra
in the board Makefile anymore<stdlib.h>