aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-25 04:00:01 +0000
committerMike Frysinger <vapier@gentoo.org>2023-01-25 00:49:47 -0500
commitddf4a3a7a05ec09da8a9c218e6597a1e8385c2d4 (patch)
treeb0c83b65855713293628f29f0ed66c75ebf5299f
parenta6568c304f10cbeae566e274db6adf53d3ddfcab (diff)
shared: move _noreturn definition into helpers.h
-rw-r--r--src/shared/_usage.c8
-rw-r--r--src/shared/helpers.h2
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