From a0524a8443b153ca36b069f6f49551b1b5df7808 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Fri, 11 Jun 2021 16:54:02 +0300 Subject: [PATCH] QSemaphore: Fix warning in 32-bit build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qtbase\src\corelib\thread\qsemaphore.cpp(157): warning C4293: '>>': shift count negative or too big, undefined behavior Change-Id: Iddf76e52770576bd57a4630884c0e0d6310cd4ff Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Allan Sandfeld Jensen --- src/corelib/thread/qsemaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp index 40c51bd8568..dfc179486c8 100644 --- a/src/corelib/thread/qsemaphore.cpp +++ b/src/corelib/thread/qsemaphore.cpp @@ -154,7 +154,7 @@ static bool futexNeedsWake(quintptr v) // low 31 bits of the high word (that is, bits 32-62). If we're not, then we only // use futexNeedsWakeAllBit to indicate anyone is waiting. if constexpr (futexHasWaiterCount) - return (v >> 32) > (unsigned(v)); + return unsigned(quint64(v) >> 32) > unsigned(v); return v >> 31; }