mirror of https://github.com/python/cpython
do_mkvalue(), 'I' and 'k' cases: squash legitimate
compiler warnings about mixing signed and unsigned types in comparisons.
This commit is contained in:
parent
c3d12ac88c
commit
35c3f4f249
|
@ -307,7 +307,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
|
||||||
{
|
{
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
n = va_arg(*p_va, unsigned int);
|
n = va_arg(*p_va, unsigned int);
|
||||||
if (n > PyInt_GetMax())
|
if (n > (unsigned long)PyInt_GetMax())
|
||||||
return PyLong_FromUnsignedLong((unsigned long)n);
|
return PyLong_FromUnsignedLong((unsigned long)n);
|
||||||
else
|
else
|
||||||
return PyInt_FromLong(n);
|
return PyInt_FromLong(n);
|
||||||
|
@ -320,7 +320,7 @@ do_mkvalue(const char **p_format, va_list *p_va)
|
||||||
{
|
{
|
||||||
unsigned long n;
|
unsigned long n;
|
||||||
n = va_arg(*p_va, unsigned long);
|
n = va_arg(*p_va, unsigned long);
|
||||||
if (n > PyInt_GetMax())
|
if (n > (unsigned long)PyInt_GetMax())
|
||||||
return PyLong_FromUnsignedLong(n);
|
return PyLong_FromUnsignedLong(n);
|
||||||
else
|
else
|
||||||
return PyInt_FromLong(n);
|
return PyInt_FromLong(n);
|
||||||
|
|
Loading…
Reference in New Issue