comparison mercurial/parsers.c @ 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 82d6a35cf432
children f4386cb3252e
comparison
equal deleted inserted replaced
25859:1619563959b3 25860:895f04955a49
1154 } 1154 }
1155 /* Propagate the phase information from the roots to the revs */ 1155 /* Propagate the phase information from the roots to the revs */
1156 if (minrevallphases != -1) { 1156 if (minrevallphases != -1) {
1157 int parents[2]; 1157 int parents[2];
1158 for (i = minrevallphases; i < len; i++) { 1158 for (i = minrevallphases; i < len; i++) {
1159 if (index_get_parents(self, i, parents, len - 1) < 0) 1159 if (index_get_parents(self, i, parents,
1160 (int)len - 1) < 0)
1160 goto release_phasesetlist; 1161 goto release_phasesetlist;
1161 set_phase_from_parents(phases, parents[0], parents[1], i); 1162 set_phase_from_parents(phases, parents[0], parents[1], i);
1162 } 1163 }
1163 } 1164 }
1164 /* Transform phase list to a python list */ 1165 /* Transform phase list to a python list */
1254 if (isfiltered) { 1255 if (isfiltered) {
1255 nothead[i] = 1; 1256 nothead[i] = 1;
1256 continue; 1257 continue;
1257 } 1258 }
1258 1259
1259 if (index_get_parents(self, i, parents, len - 1) < 0) 1260 if (index_get_parents(self, i, parents, (int)len - 1) < 0)
1260 goto bail; 1261 goto bail;
1261 for (j = 0; j < 2; j++) { 1262 for (j = 0; j < 2; j++) {
1262 if (parents[j] >= 0) 1263 if (parents[j] >= 0)
1263 nothead[parents[j]] = 1; 1264 nothead[parents[j]] = 1;
1264 } 1265 }