From 755c765263535547e46f773f46dc45ee84f2b9ed Mon Sep 17 00:00:00 2001 From: Nicky Date: Thu, 10 Feb 2022 10:34:36 +0100 Subject: [PATCH] Call std::abort in llassert_always. LL_ERRS will already terminate/crass the processes, but putting a [noreturn] function, even if never reached, makes it obvious to the compiler that the program will abort. --- indra/llcommon/llerror.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 3a58c029b0..d4c4d29f50 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -80,7 +80,7 @@ const int LL_ERR_NOERR = 0; #endif // !_DEBUG -#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL +#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) { LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL; /* call abort, this will not be reached but signaled GCC after this line the program exists*/ std::abort(); } #define llassert_always(func) llassert_always_msg(func, #func)