From: Mark Dickinson Date: Tue, 5 May 2009 17:55:58 +0000 (+0000) Subject: Merged revisions 72346 via svnmerge from X-Git-Tag: 3.0~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fca3179a459600ab1a7f60ab6dd817d14fa91dd5;p=thirdparty%2FPython%2Fcpython.git Merged revisions 72346 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r72346 | mark.dickinson | 2009-05-05 18:54:36 +0100 (Tue, 05 May 2009) | 10 lines 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. ........ ................ --- diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 7f07b7a12478..bb3a36266435 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -362,7 +362,7 @@ get_ulong(PyObject *v, unsigned long *p) return -1; } x = PyLong_AsUnsignedLongMask(v); - if (x == -1 && PyErr_Occurred()) + if (x == (unsigned long)-1 && PyErr_Occurred()) return -1; *p = x; return 0; @@ -400,7 +400,7 @@ get_ulonglong(PyObject *v, unsigned PY_LONG_LONG *p) return -1; } x = PyLong_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 2718b6942ca0..05c09d84105e 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -355,7 +355,7 @@ random_setstate(RandomObject *self, PyObject *state) for (i=0; istate[i] = element & 0xffffffffUL; /* Make sure we get sane state */ }