summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2005-12-24 06:23:41 (GMT)
committerTim Peters <tim.peters@gmail.com>2005-12-24 06:23:41 (GMT)
commit35c3f4f249409a99295764d77fdc043920a26827 (patch)
treee8d442b57c1f7366a01468f153a5f2112f45d8f6 /Python/modsupport.c
parentc3d12ac88ced9fe7de33a8f6654eef74c7f38ace (diff)
downloadcpython-35c3f4f249409a99295764d77fdc043920a26827.zip
cpython-35c3f4f249409a99295764d77fdc043920a26827.tar.gz
cpython-35c3f4f249409a99295764d77fdc043920a26827.tar.bz2
do_mkvalue(), 'I' and 'k' cases: squash legitimate
compiler warnings about mixing signed and unsigned types in comparisons.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index e77cb36..7241936 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -307,7 +307,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
{
unsigned int n;
n = va_arg(*p_va, unsigned int);
- if (n > PyInt_GetMax())
+ if (n > (unsigned long)PyInt_GetMax())
return PyLong_FromUnsignedLong((unsigned long)n);
else
return PyInt_FromLong(n);
@@ -320,7 +320,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
{
unsigned long n;
n = va_arg(*p_va, unsigned long);
- if (n > PyInt_GetMax())
+ if (n > (unsigned long)PyInt_GetMax())
return PyLong_FromUnsignedLong(n);
else
return PyInt_FromLong(n);