refactor: Add [[noreturn]] attribute to *_detected() functions

This commit is contained in:
Hennadii Stepanov 2024-02-12 14:35:35 +00:00
parent 08cfe273dd
commit 38f93fe0cb
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -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");