Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Jesper Juhl
On 29/11/06, Linus Torvalds <[EMAIL PROTECTED]> wrote: On Wed, 29 Nov 2006, Jesper Juhl wrote: > > I would venture that "-Wshadow" is another one of those. I'd agree, except for the fact that gcc does a horribly _bad_ job of -Wshadow, making it (again) totally unusable. For example, it's ofte

Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Linus Torvalds
On Wed, 29 Nov 2006, Jesper Juhl wrote: > > I would venture that "-Wshadow" is another one of those. I'd agree, except for the fact that gcc does a horribly _bad_ job of -Wshadow, making it (again) totally unusable. For example, it's often entirely interesting to hear about local variables

Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Jesper Juhl
On 29/11/06, Linus Torvalds <[EMAIL PROTECTED]> wrote: On Tue, 28 Nov 2006, Jesper Juhl wrote: > > > Friends don't let friends use "-W". > > Hehe, ok, I'll stop cleaning this stuff up then. > Nice little hobby out the window there ;) You might want to look at some of the other warnings gcc spi

Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Linus Torvalds
On Tue, 28 Nov 2006, Jesper Juhl wrote: > > > Friends don't let friends use "-W". > > Hehe, ok, I'll stop cleaning this stuff up then. > Nice little hobby out the window there ;) You might want to look at some of the other warnings gcc spits out, but this class isn't one of them. Other warnin

Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Linus Torvalds
On Tue, 28 Nov 2006, Jesper Juhl wrote: > > In kernel/sys.c::sys_prctl() the argument named 'arg2' is very clearly > of type 'unsigned long', and when compiling with "gcc -W" gcc also warns : > kernel/sys.c:2089: warning: comparison of unsigned expression < 0 is always > false > > So this p

Re: [PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Jesper Juhl
On 28/11/06, Linus Torvalds <[EMAIL PROTECTED]> wrote: On Tue, 28 Nov 2006, Jesper Juhl wrote: > > In kernel/sys.c::sys_prctl() the argument named 'arg2' is very clearly > of type 'unsigned long', and when compiling with "gcc -W" gcc also warns : > kernel/sys.c:2089: warning: comparison of un

[PATCH] Don't compare unsigned variable for <0 in sys_prctl()

2006-11-28 Thread Jesper Juhl
In kernel/sys.c::sys_prctl() the argument named 'arg2' is very clearly of type 'unsigned long', and when compiling with "gcc -W" gcc also warns : kernel/sys.c:2089: warning: comparison of unsigned expression < 0 is always false So this patch removes the test of "arg2 < 0". For those of us wh