From: Otto Moerbeek Date: Mon, 15 May 2023 11:23:55 +0000 (+0200) Subject: As an experiment, just fix the two reported cases of performance-unnecessary-value... X-Git-Tag: rec-4.9.0-beta1~17^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5fe87a227e8f11993e48ed04471432132b79644;p=thirdparty%2Fpdns.git As an experiment, just fix the two reported cases of performance-unnecessary-value-param --- diff --git a/pdns/recursordist/test-syncres_cc1.cc b/pdns/recursordist/test-syncres_cc1.cc index e265fa1042..4f8471c7b0 100644 --- a/pdns/recursordist/test-syncres_cc1.cc +++ b/pdns/recursordist/test-syncres_cc1.cc @@ -1012,7 +1012,7 @@ BOOST_AUTO_TEST_CASE(test_endless_glueless_referral) const DNSName target("powerdns.com."); size_t count = 0; - sr->setAsyncCallback([target, &count](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, &count](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); @@ -1642,7 +1642,7 @@ BOOST_AUTO_TEST_CASE(test_cname_long_loop) const DNSName target3("cname3.powerdns.com."); const DNSName target4("cname4.powerdns.com."); - sr->setAsyncCallback([target1, target2, target3, target4, &count](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([target1, target2, target3, target4, &count](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 */) { count++; if (isRootServer(ip)) {