* [Qemu-devel] More gcc -Wflags
@ 2008-09-04 19:09 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-09-04 19:09 UTC (permalink / raw)
To: qemu-devel, Paul Brook
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
These patches enable gcc warning flags -Wendif-labels, -Wshadow and
-Wpointer-arith. The other patches fix some of these warnings.
For -Wendif-labels there is nothing to fix, all code is clean. I'd
enable this flag.
Enabling -Wshadow produces a lot of useless warnings about variables
named 'index' etc, so I'm not proposing to add that. I might still fix
the warnings for local variables shadowing each other, but maybe it's
not worth the trouble and risk for new bugs.
Fixes for -Wpointer-arith are not too many, except for ARM devices.
Maybe there the use of void * arithmetics is intentional? If Paul
agrees that these should be fixed, I could make a patch that removes
these warnings too. After that, the flag could be enabled.
[-- Attachment #2: wpointer_arith.diff --]
[-- Type: plain/text, Size: 1001 bytes --]
[-- Attachment #3: fix_wpointer_arith.diff --]
[-- Type: plain/text, Size: 5025 bytes --]
[-- Attachment #4: wshadow.diff --]
[-- Type: plain/text, Size: 1017 bytes --]
[-- Attachment #5: fix_wshadow.diff --]
[-- Type: plain/text, Size: 15640 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-04 19:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-04 19:09 [Qemu-devel] More gcc -Wflags Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).