parsers: fix 'unsigned expression is always true' warning (issue4142)
On Mac OS gcc-llvm throws an -Wtautological-compare warning because flen
is defined as an unsigned integer, therefore flen < 0 is always true.
--- a/mercurial/parsers.c Thu Jan 23 14:06:15 2014 -0600
+++ b/mercurial/parsers.c Thu Jan 23 19:08:26 2014 +0100
@@ -185,7 +185,7 @@
flen = getbe32(cur + 13);
pos += 17;
cur += 17;
- if (flen > len - pos || flen < 0) {
+ if (flen > len - pos) {
PyErr_SetString(PyExc_ValueError, "overflow in dirstate");
goto quit;
}