changeset 20316:40f08c31844c stable

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.
author David Soria Parra <davidsp@fb.com>
date Thu, 23 Jan 2014 19:08:26 +0100
parents 4dd91c466a81
children d6939f29b3b3
files mercurial/parsers.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 		}