diff --git a/src/sync.cpp b/src/sync.cpp index 94cac4fa8a7..0bb335dc8f7 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -92,7 +92,7 @@ LockData& GetLockData() { return lock_data; } -static void potential_deadlock_detected(const LockPair& mismatch, const LockStack& s1, const LockStack& s2) +[[noreturn]] static void potential_deadlock_detected(const LockPair& mismatch, const LockStack& s1, const LockStack& s2) { LogPrintf("POTENTIAL DEADLOCK DETECTED\n"); LogPrintf("Previous lock order was:\n"); @@ -128,7 +128,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b)); } -static void double_lock_detected(const void* mutex, const LockStack& lock_stack) +[[noreturn]] static void double_lock_detected(const void* mutex, const LockStack& lock_stack) { LogPrintf("DOUBLE LOCK DETECTED\n"); LogPrintf("Lock order:\n");