From e83c4dd76993214bc205af32eab9b9b82ea230ac Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Fri, 5 Sep 2025 15:18:22 +0300
Subject: [PATCH 165/N] Fix warning in soamphore module

---
 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 dc521b8..ae1ecc9 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
 }
 
