Unified suppression of format warnings for GCC and Clang

This disables the following compilation warning reported by Clang:
src/p_3dfloors.cpp:1002:24: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
This commit is contained in:
alexey.lysiuk 2017-08-13 17:06:53 +03:00
parent eb52088487
commit d645e55545

View file

@ -46,16 +46,10 @@
#define PRINTFISH(x)
#endif
#ifdef __clang__
#ifdef __GNUC__
#define IGNORE_FORMAT_PRE \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wformat-invalid-specifier\"") \
_Pragma("GCC diagnostic ignored \"-Wformat-extra-args\"")
#define IGNORE_FORMAT_POST _Pragma("GCC diagnostic pop")
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6)))
#define IGNORE_FORMAT_PRE \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wformat=\"") \
_Pragma("GCC diagnostic ignored \"-Wformat\"") \
_Pragma("GCC diagnostic ignored \"-Wformat-extra-args\"")
#define IGNORE_FORMAT_POST _Pragma("GCC diagnostic pop")
#else