summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-09-19 01:43:31 +0200
committerSven Gothel <[email protected]>2021-09-19 01:43:31 +0200
commit5dddcea5e825b5f525bea02b370f0d00d40da9f6 (patch)
treea179e8db86659f825c44d6d5ef843e344b6df6a0
parent2de5f489b3d0194c8eed31ff26d3f059fe2ea14e (diff)
cpp_pragma.hpp: Add PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE and PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOWv0.4.4
-rw-r--r--include/jau/cpp_pragma.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/jau/cpp_pragma.hpp b/include/jau/cpp_pragma.hpp
index 771d261..0946416 100644
--- a/include/jau/cpp_pragma.hpp
+++ b/include/jau/cpp_pragma.hpp
@@ -36,6 +36,8 @@ namespace jau {
#define PRAGMA_DISABLE_WARNING_UNREFERENCED_FUNCTION PRAGMA_DISABLE_WARNING(4505)
#define PRAGMA_DISABLE_WARNING_CPP
#define PRAGMA_DISABLE_WARNING_MULTICHAR
+ #define PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE
+ #define PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW
#elif defined(__GNUC__) || defined(__clang__)
#define DO_PRAGMA(X) _Pragma(#X)
@@ -48,6 +50,8 @@ namespace jau {
#define PRAGMA_DISABLE_WARNING_UNREFERENCED_FUNCTION PRAGMA_DISABLE_WARNING(-Wunused-function)
#define PRAGMA_DISABLE_WARNING_CPP PRAGMA_DISABLE_WARNING(-Wcpp)
#define PRAGMA_DISABLE_WARNING_MULTICHAR PRAGMA_DISABLE_WARNING(-Wmultichar)
+ #define PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE PRAGMA_DISABLE_WARNING(-Wnull-dereference)
+ #define PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW PRAGMA_DISABLE_WARNING(-Wformat-overflow)
#else
#define PRAGMA_DISABLE_WARNING_PUSH
@@ -56,6 +60,8 @@ namespace jau {
#define PRAGMA_DISABLE_WARNING_UNREFERENCED_FUNCTION
#define PRAGMA_DISABLE_WARNING_CPP
#define PRAGMA_DISABLE_WARNING_MULTICHAR
+ #define PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE
+ #define PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW
#endif
} // namespace jau