QSemaphore: Fix warning in 32-bit build
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 <marten.nordheim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
1c164ec7f2
commit
a0524a8443
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user