Skip to content

Commit 38f93fe

Browse files
committed
refactor: Add [[noreturn]] attribute to *_detected() functions
1 parent 08cfe27 commit 38f93fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sync.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ LockData& GetLockData() {
9292
return lock_data;
9393
}
9494

95-
static void potential_deadlock_detected(const LockPair& mismatch, const LockStack& s1, const LockStack& s2)
95+
[[noreturn]] static void potential_deadlock_detected(const LockPair& mismatch, const LockStack& s1, const LockStack& s2)
9696
{
9797
LogPrintf("POTENTIAL DEADLOCK DETECTED\n");
9898
LogPrintf("Previous lock order was:\n");
@@ -128,7 +128,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac
128128
throw std::logic_error(strprintf("potential deadlock detected: %s -> %s -> %s", mutex_b, mutex_a, mutex_b));
129129
}
130130

131-
static void double_lock_detected(const void* mutex, const LockStack& lock_stack)
131+
[[noreturn]] static void double_lock_detected(const void* mutex, const LockStack& lock_stack)
132132
{
133133
LogPrintf("DOUBLE LOCK DETECTED\n");
134134
LogPrintf("Lock order:\n");

0 commit comments

Comments
 (0)