changeset 25860:895f04955a49 stable

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.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 20 Jul 2015 23:38:56 +0900
parents 1619563959b3
children 11ab8714f529
files mercurial/parsers.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)