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.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.c')
-rw-r--r-- | src/qcommon/vm_x86_64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qcommon/vm_x86_64.c b/src/qcommon/vm_x86_64.c index 1071e79f..36dd95b5 100644 --- a/src/qcommon/vm_x86_64.c +++ b/src/qcommon/vm_x86_64.c @@ -230,7 +230,7 @@ static unsigned char op_argsize[256] = [OP_BLOCK_COPY] = 4, }; -void emit(const char* fmt, ...) +static __attribute__ ((format (printf, 1, 2))) void emit(const char* fmt, ...) { va_list ap; char line[4096]; @@ -382,26 +382,26 @@ static void* getentrypoint(vm_t* vm) return vm->codeBase; } -static void CROSSCALL eop(void) +static __attribute__ ((noreturn)) void CROSSCALL eop(void) { Com_Error(ERR_DROP, "End of program reached without return!"); exit(1); } -static void CROSSCALL jmpviolation(void) +static __attribute__ ((noreturn)) void CROSSCALL jmpviolation(void) { Com_Error(ERR_DROP, "Program tried to execute code outside VM"); exit(1); } #ifdef DEBUG_VM -static void CROSSCALL memviolation(void) +static __attribute__ ((noreturn)) void CROSSCALL memviolation(void) { Com_Error(ERR_DROP, "Program tried to access memory outside VM, or unaligned memory access"); exit(1); } -static void CROSSCALL opstackviolation(void) +static __attribute__ ((noreturn)) void CROSSCALL opstackviolation(void) { Com_Error(ERR_DROP, "Program corrupted the VM opStack"); exit(1); |