Skip to content

Commit c8f47e3

Browse files
author
tim.peters
committed
do_mkvalue(), 'I' and 'k' cases: squash legitimate
compiler warnings about mixing signed and unsigned types in comparisons. git-svn-id: http://svn.python.org/projects/python/trunk@41806 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 96f2e1a commit c8f47e3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/modsupport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
307307
{
308308
unsigned int n;
309309
n = va_arg(*p_va, unsigned int);
310-
if (n > PyInt_GetMax())
310+
if (n > (unsigned long)PyInt_GetMax())
311311
return PyLong_FromUnsignedLong((unsigned long)n);
312312
else
313313
return PyInt_FromLong(n);
@@ -320,7 +320,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
320320
{
321321
unsigned long n;
322322
n = va_arg(*p_va, unsigned long);
323-
if (n > PyInt_GetMax())
323+
if (n > (unsigned long)PyInt_GetMax())
324324
return PyLong_FromUnsignedLong(n);
325325
else
326326
return PyInt_FromLong(n);

0 commit comments

Comments
 (0)