From: Georg Brandl Date: Mon, 18 Oct 2010 05:06:18 +0000 (+0000) Subject: Fix compiler warnings about formatting pid_t as an int, by always casting to long. X-Git-Tag: v3.2a4~449 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7f4af4cbe81bc2790fb7e899549100621a3bf52;p=thirdparty%2FPython%2Fcpython.git Fix compiler warnings about formatting pid_t as an int, by always casting to long. --- diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index 3ab0314298b0..c2cd9148123b 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);