From 90a97eeafe46f67007f28cde6c7d239c6e78faf0 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Fri, 5 Sep 2025 18:17:08 +0300
Subject: [PATCH 170/N] Revert fix warnings for semaphore

---
 Modules/_multiprocessing/semaphore.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c
index ae1ecc9..8c6a4a2 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
-    long sval;
+    int 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(sval);
+    return PyLong_FromLong((long)sval);
 #endif
 }
 
@@ -663,10 +663,10 @@ _multiprocessing_SemLock__is_zero_impl(SemLockObject *self)
         Py_RETURN_FALSE;
     }
 #else
-    long sval;
+    int sval;
     if (SEM_GETVALUE(self->handle, &sval) < 0)
         return _PyMp_SetError(NULL, MP_STANDARD_ERROR);
-    return PyBool_FromLong(sval == 0);
+    return PyBool_FromLong((long)sval == 0);
 #endif
 }
 
