commit dac0cda28d9dfb1e3f46b29e6f501f7259c98eda
Author: Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Tue Nov 6 15:43:44 2018 +0100
Commit: Fabian Greffrath <fabian@greffrath.com>
CommitDate: Tue Nov 6 15:43:44 2018 +0100
i_system: mark I_Quit() and I_Error() with GCC's 'noreturn' attribute
Thanks @turol for the tip.
---
src/doomtype.h | 2 ++
src/i_system.h | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/doomtype.h b/src/doomtype.h
index 745d9298..8841a0cf 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -67,11 +67,13 @@
#define PRINTF_ATTR(fmt, first) __attribute__((format(printf, fmt, first)))
#define PRINTF_ARG_ATTR(x) __attribute__((format_arg(x)))
+#define NORETURN __attribute__((noreturn))
#else
#define PACKEDATTR
#define PRINTF_ATTR(fmt, first)
#define PRINTF_ARG_ATTR(x)
+#define NORETURN
#endif
#ifdef __WATCOMC__
diff --git a/src/i_system.h b/src/i_system.h
index f87d92f6..78376f3c 100644
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -50,9 +50,9 @@ ticcmd_t* I_BaseTiccmd (void);
// Called by M_Responder when quit is selected.
// Clean exit, displays sell blurb.
-void I_Quit (void);
+void I_Quit (void) NORETURN;
-void I_Error (const char *error, ...) PRINTF_ATTR(1, 2);
+void I_Error (const char *error, ...) NORETURN PRINTF_ATTR(1, 2);
void I_Tactile (int on, int off, int total);