Re: [PATCH] x86: fix -Wsign-compare warnings in uaccess.h

From: ÐÐÐÐÐ ÐÐÐÑÐÐÐÐ
Date: Sat Jun 27 2015 - 15:20:50 EST


Toralf FÃrster <toralf.foerster@xxxxxx> ÐÐÑÐÐ Ð ÑÐÐÑÐ ÐÐÑÑÐÐ Sat, 27 Jun 2015 22:16:27 +0300:

The casts are safe, since those conditions are only evaluated when sz >= 0.


Wouldn't in this case the condition "sz < 0" be superfluously ?

No, sz can be negative. I meant that if sz < 0, then the second halves won't be evaluated (though even if they did, it wouldn't matter).
--
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/