diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-05-05 17:42:59 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-05-05 17:42:59 +0000 |
commit | 2468f68f7cfeb21db123c5043f8c9c82c117c316 (patch) | |
tree | 6415d21270f89ac2ac41f80d5ea313c317a332ec | |
parent | 82006370d24ab8b3b9357e2b7f8ae27977ce5566 (diff) | |
download | cpython-git-2468f68f7cfeb21db123c5043f8c9c82c117c316.tar.gz |
Merged revisions 72344 via svnmerge from
svn+ssh://pythondev@svn.python.org/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.
........
-rw-r--r-- | Modules/_ctypes/cfield.c | 4 | ||||
-rw-r--r-- | Modules/_randommodule.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 96264e7e9a..4037e936eb 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -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; diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index ebad311af6..b45f24396b 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 */ } |