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 ef0be45..bf247bc 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -372,7 +372,7 @@
 		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 @@
  		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 ebad311..b45f243 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -355,7 +355,7 @@
 
 	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 */
 	}