ref: dac0cda28d9dfb1e3f46b29e6f501f7259c98eda
parent: 62571c3de61a1d1d576c94a8c0b70380e4f592fe
author: Fabian Greffrath <[email protected]>
date: Tue Nov 6 10:43:44 EST 2018
i_system: mark I_Quit() and I_Error() with GCC's 'noreturn' attribute Thanks @turol for the tip.
--- 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__
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -50,9 +50,9 @@
// 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);