diff --git a/libtransmission/tr-assert.mm b/libtransmission/tr-assert.mm index bceddf1d5..18073bb7b 100644 --- a/libtransmission/tr-assert.mm +++ b/libtransmission/tr-assert.mm @@ -5,6 +5,8 @@ #import +#include // for abort() + #include #include "tr-assert.h" @@ -18,6 +20,10 @@ { auto const full_text = fmt::format(FMT_STRING("assertion failed: {:s} ({:s}:{:d})"), message, file, line); [NSException raise:NSInternalInconsistencyException format:@"%s", full_text.c_str()]; + + // We should not reach this anyway, but it helps mark the function as property noreturn + // (the Objective-C NSException method does not). + abort(); } #endif