Kaydet (Commit) 929ab934 authored tarafından Mark Dickinson's avatar Mark Dickinson

Issue #5933: Fix some gcc -Wextra warnings. Thanks Victor Stinner for

the patch.
üst 2c72420a
......@@ -372,7 +372,7 @@ get_ulong(PyObject *v, unsigned long *p)
return -1;
}
x = PyInt_AsUnsignedLongMask(v);
if (x == -1 && PyErr_Occurred())
if (x == (unsigned long)-1 && PyErr_Occurred())
return -1;
*p = x;
return 0;
......@@ -410,7 +410,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
return -1;
}
x = PyInt_AsUnsignedLongLongMask(v);
if (x == -1 && PyErr_Occurred())
if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())
return -1;
*p = x;
return 0;
......
......@@ -355,7 +355,7 @@ random_setstate(RandomObject *self, PyObject *state)
for (i=0; i<N ; i++) {
element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
if (element == -1 && PyErr_Occurred())
if (element == (unsigned long)-1 && PyErr_Occurred())
return NULL;
self->state[i] = element & 0xffffffffUL; /* Make sure we get sane state */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment