From 5dddcea5e825b5f525bea02b370f0d00d40da9f6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 19 Sep 2021 01:43:31 +0200 Subject: cpp_pragma.hpp: Add PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE and PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW --- include/jau/cpp_pragma.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3