Skip to content

Commit c563801

Browse files
authored
clang-tidy.yml: properly specify CMake option WARNINGS_ARE_ERRORS / mitigated -Wformat warnings (#6841)
1 parent 65327c6 commit c563801

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/clang-tidy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
- name: Prepare CMake
5656
run: |
57-
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off WARNINGS_ARE_ERRORS=On
57+
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off -DWARNINGS_ARE_ERRORS=On
5858
env:
5959
CC: clang-19
6060
CXX: clang++-19

externals/tinyxml2/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1717
target_compile_options_safe(tinyxml2_objs -Wno-format-nonliteral)
1818
target_compile_options_safe(tinyxml2_objs -Wno-old-style-cast)
1919
target_compile_options_safe(tinyxml2_objs -Wno-inconsistent-missing-destructor-override)
20+
target_compile_options_safe(tinyxml2_objs -Wno-format)
2021
endif()
2122

lib/json.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ SUPPRESS_WARNING_PUSH("-Wfloat-equal")
2525
SUPPRESS_WARNING_CLANG_PUSH("-Wtautological-type-limit-compare")
2626
SUPPRESS_WARNING_CLANG_PUSH("-Wextra-semi-stmt")
2727
SUPPRESS_WARNING_CLANG_PUSH("-Wzero-as-null-pointer-constant")
28+
SUPPRESS_WARNING_CLANG_PUSH("-Wformat")
2829

2930
#define PICOJSON_USE_INT64
3031
#include <picojson.h>
3132

3233
SUPPRESS_WARNING_CLANG_POP
3334
SUPPRESS_WARNING_CLANG_POP
3435
SUPPRESS_WARNING_CLANG_POP
36+
SUPPRESS_WARNING_CLANG_POP
3537
SUPPRESS_WARNING_POP
3638

3739
#endif // jsonH

0 commit comments

Comments
 (0)