From c9c3270cb2683190fd0f39377e857ef6122c4a17 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Mon, 1 Sep 2025 13:25:45 +0300 Subject: [PATCH 133/N] Fix variable size warning --- Modules/_multiprocessing/semaphore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index 8c6a4a2..3032bda 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -631,14 +631,14 @@ _multiprocessing_SemLock__get_value_impl(SemLockObject *self) PyErr_SetNone(PyExc_NotImplementedError); return NULL; #else - int sval; + long sval; if (SEM_GETVALUE(self->handle, &sval) < 0) return _PyMp_SetError(NULL, MP_STANDARD_ERROR); /* some posix implementations use negative numbers to indicate the number of waiting threads */ if (sval < 0) sval = 0; - return PyLong_FromLong((long)sval); + return PyLong_FromLong(sval); #endif }