(svn r26223) -Codechange: Silence some compile warnings about unititialized variables in the SSE blitters (MJP)

This commit is contained in:
planetmaker
2014-01-03 18:43:10 +00:00
parent 115c712f4e
commit 7b20da8a0a
5 changed files with 29 additions and 22 deletions

View File

@@ -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 */