1. Armin Rigo
  2. cpython-withatomic

Commits

Mark Dickinson  committed 987421d

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.
........

  • Participants
  • Parent commits a7c99e3
  • Branches default

Comments (0)

Files changed (2)

File Modules/_ctypes/cfield.c

View file
 		return -1;
 	}
 	x = PyLong_AsUnsignedLongMask(v);
-	if (x == -1 && PyErr_Occurred())
+	if (x == (unsigned long)-1 && PyErr_Occurred())
 		return -1;
 	*p = x;
 	return 0;
  		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;

File Modules/_randommodule.c

View file
 
 	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 */
 	}