# HG changeset patch # User Yuya Nishihara # Date 1439522714 -32400 # Node ID 83c9edcac05c51c32283d741c44454a7b7073f63 # Parent cefd5c8bab5d665385399c14048dcf290252dca9 reachableroots: silence warning of implicit integer narrowing issued by clang Tested with CFLAGS=-Wshorten-64-to-32 CC=clang which is the default of Mac OS X. Because a valid revnum shouldn't exceed INT_MAX, we don't need long width for large tovisit array. diff -r cefd5c8bab5d -r 83c9edcac05c mercurial/parsers.c --- a/mercurial/parsers.c Fri Aug 14 12:22:08 2015 +0900 +++ b/mercurial/parsers.c Fri Aug 14 12:25:14 2015 +0900 @@ -1187,7 +1187,7 @@ goto bail; } if (!(revstates[revnum + 1] & RS_SEEN)) { - tovisit[lentovisit++] = revnum; + tovisit[lentovisit++] = (int)revnum; revstates[revnum + 1] |= RS_SEEN; } } @@ -1228,7 +1228,7 @@ /* Find all the nodes in between the roots we found and the heads * and add them to the reachable set */ if (includepath == 1) { - int minidx = minroot; + long minidx = minroot; if (minidx < 0) minidx = 0; for (i = minidx; i < len; i++) {