Re: [PATCH] disable gcc warnings of sign/unsigned comparison

Trond Myklebust
2004-01-01T17:15:08Z

På to , 01/01/2004 klokka 07:33, skreiv Paul Jackson:
> This patch turns off all gcc warnings on comparing signed with unsigned
> numbers, by setting the gcc option -Wno-sign-compare in the top
> Makefile.
>

Ignoring a potential bug is, of course one way of dealing with it. Most
of us would prefer to deal with the bug itself, though.... A lot of
effort has been put into coaxing gcc into detecting such comparison
errors (see, for instance, the somewhat "unconventional" Linux min() and
max() macros) precisely because signed comparisons have been a source of
kernel bugs in the past...

How about therefore instead sending him a patch which fixes the actual
code that is causing these warnings to be generated?

Cheers,
Trond