]> granicus.if.org Git - python/commitdiff
Merged revisions 85679 via svnmerge from
authorGeorg Brandl <georg@python.org>
Tue, 23 Nov 2010 08:00:50 +0000 (08:00 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 23 Nov 2010 08:00:50 +0000 (08:00 +0000)
svn+ssh://svn.python.org/python/branches/py3k

........
  r85679 | georg.brandl | 2010-10-18 07:06:18 +0200 (Mo, 18 Okt 2010) | 1 line

  Fix compiler warnings about formatting pid_t as an int, by always casting to long.
........

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);