From: Otto Moerbeek Date: Fri, 24 Nov 2023 10:20:19 +0000 (+0100) Subject: Sometimes, coverity and clang-tidy do not agree X-Git-Tag: dnsdist-1.9.0-alpha4~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86d6338ec9fec3d0876fe2380033b095fc63a026;p=thirdparty%2Fpdns.git Sometimes, coverity and clang-tidy do not agree --- diff --git a/pdns/axfr-retriever.cc b/pdns/axfr-retriever.cc index 47a909618b..f2630c9aeb 100644 --- a/pdns/axfr-retriever.cc +++ b/pdns/axfr-retriever.cc @@ -176,7 +176,7 @@ void AXFRRetriever::timeoutReadn(uint16_t bytes, uint16_t timeoutsec) int numread; while(n(timeoutsec - (time(nullptr) - start))); if(res<0) throw ResolverException("Reading data from remote nameserver over TCP: "+stringerror()); if(!res) diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 478839ea41..fb88100af2 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1348,12 +1348,14 @@ void parseACLs() } g_initialAllowFrom = allowFrom; - broadcastFunction([=] { return pleaseSupplantAllowFrom(std::move(allowFrom)); }); + // coverity[copy_contructor_call] maybe this can be avoided, but be careful as pointers get passed to other threads + broadcastFunction([=] { return pleaseSupplantAllowFrom(allowFrom); }); auto allowNotifyFrom = parseACL("allow-notify-from-file", "allow-notify-from", log); g_initialAllowNotifyFrom = allowNotifyFrom; - broadcastFunction([=] { return pleaseSupplantAllowNotifyFrom(std::move(allowNotifyFrom)); }); + // coverity[copy_contructor_call] maybe this can be avoided, but be careful as pointers get passed to other threads + broadcastFunction([=] { return pleaseSupplantAllowNotifyFrom(allowNotifyFrom); }); l_initialized = true; }