diff options
author | planetmaker <planetmaker@openttd.org> | 2014-01-03 18:43:10 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2014-01-03 18:43:10 +0000 |
commit | 7b20da8a0aaad464e4b16942ef53140b44c92183 (patch) | |
tree | 8ea4178cf0a385564962bf6cfd429a0b8d451bfa /src/stdafx.h | |
parent | 115c712f4ea2ee09c90ee3c0f04f4bfd70d00944 (diff) | |
download | openttd-7b20da8a0aaad464e4b16942ef53140b44c92183.tar.xz |
(svn r26223) -Codechange: Silence some compile warnings about unititialized variables in the SSE blitters (MJP)
Diffstat (limited to 'src/stdafx.h')
-rw-r--r-- | src/stdafx.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index 5464c59fa..30facd337 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -490,4 +490,21 @@ static inline void free(const void *ptr) */ #define MAX_UVALUE(type) ((type)~(type)0) +#if defined(_MSC_VER) && !defined(_DEBUG) + #define IGNORE_UNINITIALIZED_WARNING_START __pragma(warning(push)) __pragma(warning(disable:4700)) + #define IGNORE_UNINITIALIZED_WARNING_STOP __pragma(warning(pop)) +#elif defined(__GNUC__) && !defined(_DEBUG) + #define HELPER0(x) #x + #define HELPER1(x) HELPER0(GCC diagnostic ignored x) + #define HELPER2(y) HELPER1(#y) + #define IGNORE_UNINITIALIZED_WARNING_START \ + _Pragma("GCC diagnostic push") \ + _Pragma(HELPER2(-Wuninitialized)) \ + _Pragma(HELPER2(-Wmaybe-uninitialized)) + #define IGNORE_UNINITIALIZED_WARNING_STOP _Pragma("GCC diagnostic pop") +#else + #define IGNORE_UNINITIALIZED_WARNING_START + #define IGNORE_UNINITIALIZED_WARNING_STOP +#endif + #endif /* STDAFX_H */ |