diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp index 24f5769d05..21acc533a1 100644 --- a/src/corelib/thread/qsemaphore.cpp +++ b/src/corelib/thread/qsemaphore.cpp @@ -153,7 +153,8 @@ static QBasicAtomicInteger *futexLow32(QBasicAtomicInteger *p } #ifdef FUTEX_OP -static const quintptr futexMultiWaiterBit = Q_UINT64_C(1) << 63; +// quintptr might be 32bit, in which case we want this to be 0, without implicitly casting. +static const quintptr futexMultiWaiterBit = static_cast(Q_UINT64_C(1) << 63); static QBasicAtomicInteger *futexHigh32(QBasicAtomicInteger *ptr) { auto result = reinterpret_cast *>(ptr);