summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-05-05 17:41:47 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-05-05 17:41:47 (GMT)
commit929ab934891719ea1561a623ee1b2e502b59e022 (patch)
treee9f724ede363da66c16c55957d44a08d2d8131a0 /Modules/_randommodule.c
parent2c72420a68e960fc703eb927cb2425744e209261 (diff)
downloadcpython-929ab934891719ea1561a623ee1b2e502b59e022.zip
cpython-929ab934891719ea1561a623ee1b2e502b59e022.tar.gz
cpython-929ab934891719ea1561a623ee1b2e502b59e022.tar.bz2
Issue #5933: Fix some gcc -Wextra warnings. Thanks Victor Stinner for
the patch.
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index ebad311..b45f243 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -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 */
}