From 82f4f706693f689c6b304313f57666b92024070e Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 31 May 2025 17:48:34 +0200 Subject: [PATCH] Adjust warnings flags (#4801) * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann * :rotating_light: suppress warnings Signed-off-by: Niels Lohmann --------- Signed-off-by: Niels Lohmann --- .clang-tidy | 2 ++ tests/thirdparty/doctest/doctest.h | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index c3a1244c3..4587c964a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,5 @@ # TODO: The first three checks are only removed to get the CI going. They have to be addressed at some point. +# TODO: portability-avoid-pragma-once: should be fixed eventually Checks: '*, @@ -59,6 +60,7 @@ Checks: '*, -modernize-use-std-numbers, -modernize-use-trailing-return-type, -performance-enum-size, + -portability-avoid-pragma-once, -readability-function-cognitive-complexity, -readability-function-size, -readability-identifier-length, diff --git a/tests/thirdparty/doctest/doctest.h b/tests/thirdparty/doctest/doctest.h index 8e2ec5dc1..2a29eb40b 100644 --- a/tests/thirdparty/doctest/doctest.h +++ b/tests/thirdparty/doctest/doctest.h @@ -4497,11 +4497,12 @@ namespace { String translateActiveException() { #ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - String res; auto& translators = getExceptionTranslators(); - for(auto& curr : translators) - if(curr->translate(res)) + for(auto& curr : translators) { + String res; + if (curr->translate(res)) return res; + } // clang-format off DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wcatch-value") try {