Make declaration of die() specify the __NORETURN attribute
authorJonas Fonseca <fonseca@diku.dk>
Tue, 6 Jun 2006 22:26:27 +0000 (00:26 +0200)
committerJonas Fonseca Madsen <fonseca@ask.diku.dk>
Tue, 6 Jun 2006 22:26:27 +0000 (00:26 +0200)
Avoids warnings with gcc 3.3.5.

tig.c

diff --git a/tig.c b/tig.c
index b827a92..027a8b7 100644 (file)
--- a/tig.c
+++ b/tig.c
 
 #include <curses.h>
 
-static void die(const char *err, ...);
+#if __GNUC__ >= 3
+#define __NORETURN __attribute__((__noreturn__))
+#else
+#define __NORETURN
+#endif
+
+static void __NORETURN die(const char *err, ...);
 static void report(const char *msg, ...);
 static int read_properties(FILE *pipe, const char *separators, int (*read)(char *, int, char *, int));
 static void set_nonblocking_input(bool loading);
@@ -2550,12 +2556,6 @@ read_properties(FILE *pipe, const char *separators,
  * Main
  */
 
-#if __GNUC__ >= 3
-#define __NORETURN __attribute__((__noreturn__))
-#else
-#define __NORETURN
-#endif
-
 static void __NORETURN
 quit(int sig)
 {