From 3eb51a655f248ae545f0a41a055a299b737f6b73 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 23 Jan 2012 14:54:55 +0000 Subject: [PATCH] use noreturn macro for GNUNET_abort to help gcc and others --- src/include/gnunet_common.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 76b26ddff..7c587a782 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -116,6 +116,11 @@ */ #define GNUNET_UNUSED __attribute__((unused)) +/** + * gcc-ism to document functions that don't return + */ +#define GNUNET_NORETURN __attribute__((noreturn)) + #if __GNUC__ > 3 /** * gcc 4.x-ism to pack structures even on W32 (to be used before structs) @@ -319,7 +324,7 @@ GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, const char *comp, * Abort the process, generate a core dump if possible. */ void -GNUNET_abort (void); +GNUNET_abort (void) GNUNET_NORETURN; /** * Ignore the next n calls to the log function. -- 2.25.1