diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-07-18 14:56:57 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 22:30:51 +0000 |
commit | 61d3cdbb34ed7ebaa9a9a3c4f13595488b80c8f5 (patch) | |
tree | d44aabf9275f27eacbf6b877eed878a4ae3ee671 /src/qcommon/vm_x86_64_assembler.c | |
parent | 2e4f58b4422995f703e51aa92a7e49d0d0664f00 (diff) |
Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton
Diffstat (limited to 'src/qcommon/vm_x86_64_assembler.c')
-rw-r--r-- | src/qcommon/vm_x86_64_assembler.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qcommon/vm_x86_64_assembler.c b/src/qcommon/vm_x86_64_assembler.c index ad2aeea5..2fb67cf1 100644 --- a/src/qcommon/vm_x86_64_assembler.c +++ b/src/qcommon/vm_x86_64_assembler.c @@ -32,6 +32,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include <inttypes.h> +// Ignore __attribute__ on non-gcc platforms +#ifndef __GNUC__ +#ifndef __attribute__ +#define __attribute__(x) +#endif +#endif + typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; @@ -57,7 +64,7 @@ static FILE* fout; #define debug(fmt, args...) #endif -static void _crap(const char* func, const char* fmt, ...) +static __attribute__ ((noreturn)) __attribute__ ((format (printf, 2, 3))) void _crap(const char* func, const char* fmt, ...) { va_list ap; fprintf(stderr, "%s() - ", func); |