Re: [PATCH 2.6] clean-up: fixes "unsigned>=0" warning

From: Riina Kikas
Date: Mon Dec 06 2004 - 16:26:49 EST


Seems that this one has been fixed somewhere between 2.6.8 and 2.6.9, so
it doesn't need to be fixed any more. Sorry for that.

Riina


On Mon, 6 Dec 2004, Chris Friesen wrote:

Riina Kikas wrote:
This patch fixes warning "comparison of unsigned expression >= 0 is always true"
occuring on line 38

Signed-off-by: Riina Kikas <Riina.Kikas@xxxxxxx>

--- a/fs/ntfs/collate.h 2004-10-18 21:53:06.000000000 +0000
+++ b/fs/ntfs/collate.h 2004-12-04 13:26:03.000000000 +0000
@@ -37,7 +37,7 @@
if (unlikely(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG))
return FALSE;
i = le32_to_cpu(cr);
- if (likely(((i >= 0) && (i <= 0x02)) ||
+ if (likely(cr <= 0x02 ||

Do we really want to be doing any operations on "cr", since it's not known what endianness of cpu we're on?

Chris

-
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/