diff options
author | Georg Brandl <georg@python.org> | 2010-10-18 05:06:18 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-18 05:06:18 (GMT) |
commit | c7f4af4cbe81bc2790fb7e899549100621a3bf52 (patch) | |
tree | 6a7cb2ff9dce8bf3cf64e76432e5ee122a573fe6 | |
parent | e194dd60f0d00a3537ca118cfe5372c72c33bdf3 (diff) | |
download | cpython-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.
-rw-r--r-- | Modules/_multiprocessing/semaphore.c | 2 |
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); |