diff --git a/.github/workflows/clang-analyzer.yml b/.github/workflows/clang-analyzer.yml index b25ac6972..78ab1d4fe 100644 --- a/.github/workflows/clang-analyzer.yml +++ b/.github/workflows/clang-analyzer.yml @@ -76,7 +76,7 @@ jobs: run: | sudo pip3 install codechecker # disable IPO to make compilation faster - cmake -S . -B build -DBUILD_TESTING=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DQD_ENABLE_ASSERTIONS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + cmake -S . -B build -DBUILD_TESTING=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DQD_ENABLE_ASSERTIONS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_WARNING_ERROR=OFF # perform build so that generated sources get generated cmake --build build CodeChecker analyze build/compile_commands.json -o ./reports diff --git a/src/router_core/modules/test_hooks/core_test_hooks.c b/src/router_core/modules/test_hooks/core_test_hooks.c index 8a98ae933..9d88a91fb 100644 --- a/src/router_core/modules/test_hooks/core_test_hooks.c +++ b/src/router_core/modules/test_hooks/core_test_hooks.c @@ -765,14 +765,16 @@ static void _handle_crash_request(qdr_core_t *core, qd_message_t *message) while (true) { // tell the code analyzer that it should mind its own business... #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak" #pragma GCC diagnostic ignored "-Wanalyzer-possible-null-dereference" -#if __GNUC__ > 12 #pragma GCC diagnostic ignored "-Wanalyzer-out-of-bounds" -#endif + // NOLINTBEGIN volatile unsigned long *ptr = (unsigned long *) qd_malloc(sizeof(unsigned long)); for (int k = 0; k < 2 * 1024 * 1024; k++) *ptr++ = ~0UL; + // NOLINTEND #pragma GCC diagnostic pop sched_yield(); // let other threads try to malloc... }