From e25d9d6ad9e89ff5730d05faeec4ba9e2a66181f Mon Sep 17 00:00:00 2001 From: AZero13 Date: Mon, 17 Nov 2025 15:57:55 -0500 Subject: [PATCH] Fix operator precedence warning --- stl/src/mutex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/src/mutex.cpp b/stl/src/mutex.cpp index 4a35e8c77aa..735aa8f054b 100644 --- a/stl/src/mutex.cpp +++ b/stl/src/mutex.cpp @@ -95,7 +95,7 @@ static _Thrd_result mtx_do_lock(_Mtx_t mtx, const _timespec64* target) noexcept res = WAIT_OBJECT_0; - } else if (target->tv_sec < 0 || target->tv_sec == 0 && target->tv_nsec <= 0) { + } else if (target->tv_sec < 0 || (target->tv_sec == 0 && target->tv_nsec <= 0)) { // target time <= 0 --> plain trylock or timed wait for time that has passed; try to lock with 0 timeout if (mtx->_Thread_id != current_thread_id) { // not this thread, lock it if (TryAcquireSRWLockExclusive(get_srw_lock(mtx)) != 0) { @@ -109,7 +109,7 @@ static _Thrd_result mtx_do_lock(_Mtx_t mtx, const _timespec64* target) noexcept // TRANSITION, ABI: this branch is preserved for `_Mtx_timedlock` _timespec64 now; _Timespec64_get_sys(&now); - while (now.tv_sec < target->tv_sec || now.tv_sec == target->tv_sec && now.tv_nsec < target->tv_nsec) { + while (now.tv_sec < target->tv_sec || (now.tv_sec == target->tv_sec && now.tv_nsec < target->tv_nsec)) { // time has not expired if (mtx->_Thread_id == current_thread_id || TryAcquireSRWLockExclusive(get_srw_lock(mtx)) != 0) { // stop waiting