diff options
author | smatz <smatz@openttd.org> | 2009-07-01 21:29:03 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-07-01 21:29:03 +0000 |
commit | 93c5300fc5cf8041b4e57eac0c714d5f55a6ed8b (patch) | |
tree | ff2e05e25ffed493c169e23c966e3c3e35509636 /src/stdafx.h | |
parent | 76a50ce94dc7c78d76c309d8a639591fed2a2da8 (diff) | |
download | openttd-93c5300fc5cf8041b4e57eac0c714d5f55a6ed8b.tar.xz |
(svn r16715) -Codechange: add attribute to assert_compile(), so it doesn't warn when used inside function
Diffstat (limited to 'src/stdafx.h')
-rw-r--r-- | src/stdafx.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index 24c9e799d..ca6504091 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -123,6 +123,7 @@ #define CDECL #define __int64 long long #define GCC_PACK __attribute__((packed)) + #define UNUSED __attribute__((unused)) /* Warn about functions using 'printf' format syntax. First argument determines which parameter * is the format string, second argument is start of values passed to printf. */ #define WARN_FORMAT(string, args) __attribute__ ((format (printf, string, args))) @@ -133,6 +134,7 @@ #define FORCEINLINE inline #define CDECL #define GCC_PACK + #define UNUSED #define WARN_FORMAT(string, args) #include <malloc.h> #endif /* __WATCOMC__ */ @@ -184,6 +186,9 @@ #define CDECL _cdecl #endif + #define GCC_PACK + #define UNUSED + int CDECL snprintf(char *str, size_t size, const char *format, ...) WARN_FORMAT(3, 4); #if defined(WINCE) int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap); @@ -202,9 +207,6 @@ #define fseek _fseeki64 #endif /* _WIN64 || WIN64 */ - - #define GCC_PACK - /* This is needed to zlib uses the stdcall calling convention on visual studio */ #if defined(WITH_ZLIB) || defined(WITH_PNG) #if !defined(ZLIB_WINAPI) @@ -304,7 +306,7 @@ typedef unsigned char byte; #if defined(__OS2__) #define assert_compile(expr) #else - #define assert_compile(expr) extern const int __ct_assert__[1 - 2 * !(expr)] + #define assert_compile(expr) extern const int __ct_assert__[1 - 2 * !(expr)] UNUSED #endif /* __OS2__ */ /* Check if the types have the bitsizes like we are using them */ |