From ddf4a3a7a05ec09da8a9c218e6597a1e8385c2d4 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 25 Jan 2023 04:00:01 +0000 Subject: shared: move _noreturn definition into helpers.h --- src/shared/_usage.c | 8 -------- src/shared/helpers.h | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/shared/_usage.c b/src/shared/_usage.c index bba03b92..1cc48f56 100644 --- a/src/shared/_usage.c +++ b/src/shared/_usage.c @@ -18,14 +18,6 @@ #include "_usage.h" #include "version.h" -#if lint -# define _noreturn -#endif -#if __GNUC__ > 2 || defined(__INTEL_COMPILER) -# define _noreturn __attribute__ ((__noreturn__)) -#else -# define _noreturn -#endif void set_quiet_options(void) { diff --git a/src/shared/helpers.h b/src/shared/helpers.h index 44d76552..eaf685c6 100644 --- a/src/shared/helpers.h +++ b/src/shared/helpers.h @@ -27,10 +27,12 @@ #endif #if __GNUC__ > 2 || defined(__INTEL_COMPILER) # define _dead __attribute__((__noreturn__)) +# define _noreturn __attribute__ ((__noreturn__)) # define _unused __attribute__((__unused__)) # define _xasprintf(a, b) __attribute__((__format__(__printf__, a, b))) #else # define _dead +# define _noreturn # define _unused # define _xasprintf(a, b) #endif -- cgit v1.2.3