From 5b562407c1373913b244991e0580f9c54fd013d9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 29 Nov 2009 21:56:10 +0000 Subject: COMMON: Replace NORETURN by NORETURN_PRE & NORETURN_POST svn-id: r46205 --- common/scummsys.h | 14 +++++++++----- common/textconsole.cpp | 2 +- common/textconsole.h | 6 +----- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'common') diff --git a/common/scummsys.h b/common/scummsys.h index 00d76916aa..aa801afd03 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -187,7 +187,7 @@ #ifndef __GNUC__ #define FORCEINLINE __forceinline - #define NORETURN __declspec(noreturn) + #define NORETURN_PRE __declspec(noreturn) #endif #define PLUGIN_EXPORT __declspec(dllexport) @@ -204,7 +204,7 @@ #define SCUMM_LITTLE_ENDIAN #define FORCEINLINE __forceinline - #define NORETURN __declspec(noreturn) + #define NORETURN_PRE __declspec(noreturn) #define PLUGIN_EXPORT __declspec(dllexport) @@ -350,7 +350,7 @@ // GCC specific stuff // #if defined(__GNUC__) - #define NORETURN __attribute__((__noreturn__)) + #define NORETURN_POST __attribute__((__noreturn__)) #define PACKED_STRUCT __attribute__((__packed__)) #define GCC_PRINTF(x,y) __attribute__((__format__(printf, x, y))) @@ -374,8 +374,12 @@ #define PLUGIN_EXPORT #endif -#ifndef NORETURN -#define NORETURN +#ifndef NORETURN_PRE +#define NORETURN_PRE +#endif + +#ifndef NORETURN_POST +#define NORETURN_POST #endif #ifndef STRINGBUFLEN diff --git a/common/textconsole.cpp b/common/textconsole.cpp index 22e4119084..a74540ea73 100644 --- a/common/textconsole.cpp +++ b/common/textconsole.cpp @@ -73,7 +73,7 @@ void warning(const char *s, ...) { #endif -void NORETURN error(const char *s, ...) { +void NORETURN_PRE error(const char *s, ...) { char buf_input[STRINGBUFLEN]; char buf_output[STRINGBUFLEN]; va_list va; diff --git a/common/textconsole.h b/common/textconsole.h index cff0dad55b..963d674c3b 100644 --- a/common/textconsole.h +++ b/common/textconsole.h @@ -62,11 +62,7 @@ void setErrorHandler(ErrorHandler handler); } // End of namespace Common -#if defined(__GNUC__) -void error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN; -#else -void NORETURN error(const char *s, ...); -#endif +void NORETURN_PRE error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST; #ifdef DISABLE_TEXT_CONSOLE -- cgit v1.2.3