From 6a05d6399348563849cdc65eb49eea0e5dd96461 Mon Sep 17 00:00:00 2001 From: Desour Date: Mon, 12 Jun 2023 22:52:18 +0200 Subject: [PATCH] Use [[noreturn]] --- src/debug.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/debug.h b/src/debug.h index 9d3e78cbc..fcef2091c 100644 --- a/src/debug.h +++ b/src/debug.h @@ -30,10 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifdef _MSC_VER #include #endif - #define NORETURN __declspec(noreturn) #define FUNCTION_NAME __FUNCTION__ #else - #define NORETURN __attribute__ ((__noreturn__)) #define FUNCTION_NAME __PRETTY_FUNCTION__ #endif @@ -48,7 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc., /* Abort program execution immediately */ -NORETURN extern void fatal_error_fn( +[[noreturn]] extern void fatal_error_fn( const char *msg, const char *file, unsigned int line, const char *function); @@ -66,7 +64,7 @@ NORETURN extern void fatal_error_fn( defined) */ -NORETURN extern void sanity_check_fn( +[[noreturn]] extern void sanity_check_fn( const char *assertion, const char *file, unsigned int line, const char *function);