Re: [PATCH] mm/slab.c remove impossible <0 check - size_t is notsigned - patch is against 2.6.1-rc1-mm2

From: Paul Jackson
Date: Thu Jan 08 2004 - 05:17:19 EST


Jason asked:
> Well, anything wrong in cleaning them [unsigned compare warnings] up?

It's more important that we write code that will fit in our limited
human brains than that we write code that will avoid spurious warnings
from gcc ('spurious' meaning warnings for code that gcc will correctly
compile anyway).

Or, see a couple months ago, in a thread with the Subject of:

[PATCH] irda: fix type of struct irda_ias_set.attribute.irda_attrib_string.len

in which Linus wrote:
> That's why I hate the "sign compare" warning of gcc so much - it warns
> about things that you CANNOT sanely write in any other way. That makes
> that particular warning _evil_, since it encourages people to write crap
> code.


--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/