summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
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/_ctypes
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/_ctypes')
-rw-r--r--Modules/_ctypes/cfield.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index ef0be45..bf247bc 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;