parsers: silence warning of implicit integer conversion issued by clang
"-Wshorten-64-to-32" is enabled by default on Mac OS X. Because "len" should
be represented in 32bit integer, this patch simply cast ssize_t to int.
--- a/mercurial/parsers.c Sun Jul 19 15:27:28 2015 +0900
+++ b/mercurial/parsers.c Mon Jul 20 23:38:56 2015 +0900
@@ -1156,7 +1156,8 @@
if (minrevallphases != -1) {
int parents[2];
for (i = minrevallphases; i < len; i++) {
- if (index_get_parents(self, i, parents, len - 1) < 0)
+ if (index_get_parents(self, i, parents,
+ (int)len - 1) < 0)
goto release_phasesetlist;
set_phase_from_parents(phases, parents[0], parents[1], i);
}
@@ -1256,7 +1257,7 @@
continue;
}
- if (index_get_parents(self, i, parents, len - 1) < 0)
+ if (index_get_parents(self, i, parents, (int)len - 1) < 0)
goto bail;
for (j = 0; j < 2; j++) {
if (parents[j] >= 0)