Re: RE:2.4.19 warnings with allnoconfig

Willy Tarreau (willy@w.ods.org)
Sun, 4 Aug 2002 10:16:20 +0200


On Sun, Aug 04, 2002 at 09:58:25AM +0200, Christian Neumair wrote:
> > 2.4.19 with make allnoconfig produces these warnings.
>
> Just a hint:
> There is almost no software with completely clean code.
> Whenever you see one compiling and it produces no warnings it's most
> likely that the build script just suppresses warnings.

I completely disagree with you. I try hard to make my programs
compile without a warning with -Wall, even if it sometimes makes
the code a bit more difficult to read (mainly because of
parenthesis and casts). This way, I have fairly reduced portability
issues with 32/64 bits, LE/BE machines.

Just a hint :-)
It is always bad to ignore the compiler's complaints, because it tells
you that it may do things wrong when it's not sure about what you want.

Spending hours fixing a few warnings in the kernel has already led me
to fix some bugs that only a compiler or an attentive human would have
detected, specially when indentation fools you. Eg, this common mistake :

if (something1)
if (something 2)
do_2();
else
do_not_1();

Cheers,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/