From b5c9e67f19d607d0540404fc8de463a7a3801f0a Mon Sep 17 00:00:00 2001 From: Timo Hirvonen Date: Wed, 17 May 2006 17:57:14 +0200 Subject: [PATCH] Mark quit() and die() __noreturn Fixes tig.c|898| warning: 'steps' may be used uninitialized in this function --- tig.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.30.2