[PATCH 3 of 4 warning-cleanup] parsers: avoid int/unsigned conversions

Augie Fackler raf at durin42.com
Fri Aug 21 13:36:11 CDT 2015


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1440182031 14400
#      Fri Aug 21 14:33:51 2015 -0400
# Node ID c94fce4d889c4f83b6d62bd8a2d4550aa0fb91f0
# Parent  f9f6192f329048b537dc2dc2af18f98479fe4388
parsers: avoid int/unsigned conversions

Detected with
make local CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter' CC=clang

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -705,8 +705,8 @@ typedef struct {
 	PyObject *headrevs;    /* cache, invalidated on changes */
 	PyObject *filteredrevs;/* filtered revs set */
 	nodetree *nt;          /* base-16 trie */
-	int ntlength;          /* # nodes in use */
-	int ntcapacity;        /* # nodes allocated */
+	unsigned ntlength;          /* # nodes in use */
+	unsigned ntcapacity;        /* # nodes allocated */
 	int ntdepth;           /* maximum depth of tree */
 	int ntsplits;          /* # splits performed */
 	int ntrev;             /* last rev scanned */


More information about the Mercurial-devel mailing list