]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix compiler warnings about formatting pid_t as an int, by always casting to long.
authorGeorg Brandl <georg@python.org>
Mon, 18 Oct 2010 05:06:18 +0000 (05:06 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 18 Oct 2010 05:06:18 +0000 (05:06 +0000)
Modules/_multiprocessing/semaphore.c

index 3ab0314298b09ee32daaf7f314ed94541e6c9db5..c2cd9148123bf09aa119f5930ce2f3620b3808ae 100644 (file)
@@ -433,7 +433,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
         return NULL;
     }
 
-    PyOS_snprintf(buffer, sizeof(buffer), "/mp%d-%d", getpid(), counter++);
+    PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++);
 
     SEM_CLEAR_ERROR();
     handle = SEM_CREATE(buffer, value, maxvalue);