From 6bf7d9e319d4c06323a8454415e5a91270965209 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 15 May 2023 13:40:06 +0200 Subject: [PATCH] -cppcoreguidelines-avoid-non-const-global-variables --- .clang-tidy.full | 2 +- pdns/recursordist/test-syncres_cc1.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy.full b/.clang-tidy.full index baae11e157..4b10cf3989 100644 --- a/.clang-tidy.full +++ b/.clang-tidy.full @@ -1,5 +1,5 @@ --- -Checks: 'clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,bugprone-*,concurrency-*,modernize-*,performance-*,portability-*,readability-*,-modernize-use-trailing-return-type,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-avoid-non-const-global-variables,--cppcoreguidelines-pro-type-vararg' +Checks: 'clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,bugprone-*,concurrency-*,modernize-*,performance-*,portability-*,readability-*,-modernize-use-trailing-return-type,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-pro-type-vararg' WarningsAsErrors: '' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false diff --git a/pdns/recursordist/test-syncres_cc1.cc b/pdns/recursordist/test-syncres_cc1.cc index 4f8471c7b0..3d642a1724 100644 --- a/pdns/recursordist/test-syncres_cc1.cc +++ b/pdns/recursordist/test-syncres_cc1.cc @@ -1707,7 +1707,7 @@ BOOST_AUTO_TEST_CASE(test_cname_length) size_t length = 0; const DNSName target("cname.powerdns.com."); - sr->setAsyncCallback([target, &length](const ComboAddress& ip, const DNSName& domain, int /* type */, bool /* doTCP */, bool /* sendRDQuery */, int /* EDNS0Level */, struct timeval* /* now */, boost::optional& /* srcmask */, boost::optional /* context */, LWResult* res, bool* /* chained */) { + sr->setAsyncCallback([target, &length](const ComboAddress& ip, const DNSName& domain, int /* type */, bool /* doTCP */, bool /* sendRDQuery */, int /* EDNS0Level */, struct timeval* /* now */, boost::optional& /* srcmask */, const boost::optional& /* context */, LWResult* res, bool* /* chained */) { if (isRootServer(ip)) { setLWResult(res, 0, false, false, true); -- 2.47.2