From: Jonas Fonseca Date: Tue, 6 Jun 2006 22:26:27 +0000 (+0200) Subject: Make declaration of die() specify the __NORETURN attribute X-Git-Tag: tig-0.5~94 X-Git-Url: https://git.distorted.org.uk/~mdw/tig/commitdiff_plain/e2da526db9f410194cbb67a8ec207545879939b5 Make declaration of die() specify the __NORETURN attribute Avoids warnings with gcc 3.3.5. --- diff --git a/tig.c b/tig.c index b827a92..027a8b7 100644 --- a/tig.c +++ b/tig.c @@ -32,7 +32,13 @@ #include -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) {