From 86d6338ec9fec3d0876fe2380033b095fc63a026 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 24 Nov 2023 11:20:19 +0100 Subject: [PATCH] Sometimes, coverity and clang-tidy do not agree --- pdns/axfr-retriever.cc | 2 +- pdns/recursordist/rec-main.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.47.2