Thread (9 messages) 9 messages, 6 authors, 2004-11-23

Re: [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c

From: Linus Torvalds <torvalds@osdl.org>
Date: 2004-11-23 18:37:24
Also in: lkml


On Tue, 23 Nov 2004, Jesper Juhl wrote:
Shutting up gcc is not the primary goal here, the goal is/was to  
a) review the code and make sure that it is safe and correct, and fix it 
when it is not.
b) remove comparisons that are just a waste of CPU cycles when the result 
is always true or false (in *all* cases on *all* archs).
Well, I'm convinced that (b) is unnecessary, as any compiler that notices 
the range thing enough to warn will also be smart enough to just remove 
the test internally.

But yes, as long as the thing is a "review and fix bugs" and not a quest 
to remove warnings which may well be compiler figments, that's obviously 
ok.

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help