[PATCH V2] parsers: remove warning: format ‘%ld’ expects argument of type ‘long int’
André Sintzoff
andre.sintzoff at gmail.com
Thu Apr 18 14:19:57 CDT 2013
# HG changeset patch
# User André Sintzoff <andre.sintzoff at gmail.com>
# Date 1366309718 -7200
# Jeu avr 18 20:28:38 2013 +0200
# Node ID a5c02eac79f98a9882354555bc75763d87a6d627
# Parent 7d31f2e42a8afb54c8fae87e8e3e29a63578aea4
parsers: remove warning: format ‘%ld’ expects argument of type ‘long int’
gcc 4.6.3 on 12.04 Ubuntu machine emits warnings:
mercurial/parsers.c: In function ‘find_deepest’:
mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 3 has type ‘Py_ssize_t’ [-Wformat]
mercurial/parsers.c:1288:9: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 4 has type ‘Py_ssize_t’ [-Wformat]
diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -1285,7 +1285,7 @@
if (revcount > capacity) {
PyErr_Format(PyExc_OverflowError,
"bitset size (%ld) > capacity (%ld)",
- revcount, capacity);
+ (long)revcount, (long)capacity);
return NULL;
}
More information about the Mercurial-devel
mailing list