Mark Dickinson avatar 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.
........

Comments (0)

Files changed (2)

Modules/_ctypes/cfield.c

 		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;

Modules/_randommodule.c

 
 	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 */
 	}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.