Skip to content

Commit

Permalink
suppressed -Wformat clang compiler warnings for PicoJSON and TinyXML2
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 29, 2024
1 parent 13a22b0 commit 0ad531d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions externals/tinyxml2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options_safe(tinyxml2_objs -Wno-format-nonliteral)
target_compile_options_safe(tinyxml2_objs -Wno-old-style-cast)
target_compile_options_safe(tinyxml2_objs -Wno-inconsistent-missing-destructor-override)
target_compile_options_safe(tinyxml2_objs -Wno-format)
endif()

2 changes: 2 additions & 0 deletions lib/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ SUPPRESS_WARNING_PUSH("-Wfloat-equal")
SUPPRESS_WARNING_CLANG_PUSH("-Wtautological-type-limit-compare")
SUPPRESS_WARNING_CLANG_PUSH("-Wextra-semi-stmt")
SUPPRESS_WARNING_CLANG_PUSH("-Wzero-as-null-pointer-constant")
SUPPRESS_WARNING_CLANG_PUSH("-Wformat")

#define PICOJSON_USE_INT64
#include <picojson.h>

SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_CLANG_POP
SUPPRESS_WARNING_POP

#endif // jsonH

0 comments on commit 0ad531d

Please sign in to comment.