Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cc2cf7

Browse files
committed
Merged revisions 72344 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r72344 | mark.dickinson | 2009-05-05 18:41:47 +0100 (Tue, 05 May 2009) | 3 lines Issue #5933: Fix some gcc -Wextra warnings. Thanks Victor Stinner for the patch. ........
1 parent 3bef15b commit 9cc2cf7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/_ctypes/cfield.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ get_ulong(PyObject *v, unsigned long *p)
362362
return -1;
363363
}
364364
x = PyLong_AsUnsignedLongMask(v);
365-
if (x == -1 && PyErr_Occurred())
365+
if (x == (unsigned long)-1 && PyErr_Occurred())
366366
return -1;
367367
*p = x;
368368
return 0;
@@ -400,7 +400,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p)
400400
return -1;
401401
}
402402
x = PyLong_AsUnsignedLongLongMask(v);
403-
if (x == -1 && PyErr_Occurred())
403+
if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())
404404
return -1;
405405
*p = x;
406406
return 0;

Modules/_randommodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ random_setstate(RandomObject *self, PyObject *state)
355355

356356
for (i=0; i<N ; i++) {
357357
element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
358-
if (element == -1 && PyErr_Occurred())
358+
if (element == (unsigned long)-1 && PyErr_Occurred())
359359
return NULL;
360360
self->state[i] = element & 0xffffffffUL; /* Make sure we get sane state */
361361
}

0 commit comments

Comments
 (0)