summaryrefslogtreecommitdiffstats
path: root/Modules/_multiprocessing
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-18 05:06:18 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-18 05:06:18 (GMT)
commitc7f4af4cbe81bc2790fb7e899549100621a3bf52 (patch)
tree6a7cb2ff9dce8bf3cf64e76432e5ee122a573fe6 /Modules/_multiprocessing
parente194dd60f0d00a3537ca118cfe5372c72c33bdf3 (diff)
downloadcpython-c7f4af4cbe81bc2790fb7e899549100621a3bf52.zip
cpython-c7f4af4cbe81bc2790fb7e899549100621a3bf52.tar.gz
cpython-c7f4af4cbe81bc2790fb7e899549100621a3bf52.tar.bz2
Fix compiler warnings about formatting pid_t as an int, by always casting to long.
Diffstat (limited to 'Modules/_multiprocessing')
-rw-r--r--Modules/_multiprocessing/semaphore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c
index 3ab0314..c2cd914 100644
--- a/Modules/_multiprocessing/semaphore.c
+++ b/Modules/_multiprocessing/semaphore.c
@@ -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);