mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
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:
parent
eb52088487
commit
d645e55545
1 changed files with 2 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue