From c7f4af4cbe81bc2790fb7e899549100621a3bf52 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 18 Oct 2010 05:06:18 +0000 Subject: [PATCH] Fix compiler warnings about formatting pid_t as an int, by always casting to long. --- Modules/_multiprocessing/semaphore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.3