dtc: Enable more warnings
Jon Loeliger
jdl at jdl.com
Sat Mar 6 08:46:38 EST 2010
> This patch turns on a bunch of extra gcc warnings, most of which are
> probably a good idea. Of the new warnings -Wnested-externs and
> -Wstrict-prototypes need no code changes, we're already warning-clean.
> The remaining one, -Wmissing-prototypes requires trivial changes in
> some of the tests (making functions local).
>
> This patch also rearranges the warnings flags into a separate make
> variable for convenience, and turns on -Werror, to really encourage
> people to keep the code warning-clean.
>
> Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
Well, I'd like to apply this patch. But doing so appears
to be very effective. So much so that the "make check"
now fails:
$ gcc --version
gcc (Debian 4.3.2-1.1) 4.3.2
$ make check
CHK version_gen.h
CC tests/testutils.o
cc1: warnings being treated as errors
tests/testutils.c: In function âsigint_handlerâ:
tests/testutils.c:44: error: unused parameter âsiâ
tests/testutils.c:44: error: unused parameter âucâ
tests/testutils.c: In function âtest_initâ:
tests/testutils.c:52: error: unused parameter âargcâ
tests/testutils.c: In function âcheck_propertyâ:
tests/testutils.c:113: error: comparison between signed and unsigned
tests/testutils.c:117: error: comparison between signed and unsigned
make: *** [tests/testutils.o] Error 1
More information about the devicetree-discuss
mailing list