use noreturn macro for GNUNET_abort to help gcc and others
authorChristian Grothoff <christian@grothoff.org>
Mon, 23 Jan 2012 14:54:55 +0000 (14:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 23 Jan 2012 14:54:55 +0000 (14:54 +0000)
src/include/gnunet_common.h

index 76b26ddff17d88651a3aa8c36182aee03988fa0a..7c587a782ccaf16226d4086ccdbdb9d01c5f5d59 100644 (file)
  */
 #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.