From: Timo Hirvonen Date: Wed, 17 May 2006 15:57:14 +0000 (+0200) Subject: Mark quit() and die() __noreturn X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b5c9e67f19d607d0540404fc8de463a7a3801f0a;p=tig.git Mark quit() and die() __noreturn Fixes tig.c|898| warning: 'steps' may be used uninitialized in this function --- diff --git a/tig.c b/tig.c index c4d7589..c3ed1f1 100644 --- a/tig.c +++ b/tig.c @@ -2031,7 +2031,13 @@ load_refs(void) * Main */ -static void +#if __GNUC__ >= 3 +#define __NORETURN __attribute__((__noreturn__)) +#else +#define __NORETURN +#endif + +static void __NORETURN quit(int sig) { /* XXX: Restore tty modes and let the OS cleanup the rest! */ @@ -2040,7 +2046,7 @@ quit(int sig) exit(0); } -static void die(const char *err, ...) +static void __NORETURN die(const char *err, ...) { va_list args;