]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Mark function argument using in DLOG() call as maybe_unused 13226/head
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 31 Oct 2023 10:38:20 +0000 (11:38 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Tue, 31 Oct 2023 10:38:20 +0000 (11:38 +0100)
pdns/ueberbackend.cc

index 3db6d3971d083ac7831ed341e038779668f53150..2e3279d2b0b8ab306efa98c33bf5edd08670fe47 100644 (file)
@@ -434,16 +434,14 @@ static std::vector<std::unique_ptr<DNSBackend>>::iterator findBestMatchingBacken
   return backend;
 }
 
-static bool foundTarget(const DNSName& target, const DNSName& shorter, const QType& qtype, SOAData* soaData, const bool found)
+static bool foundTarget(const DNSName& target, const DNSName& shorter, const QType& qtype, [[maybe_unused]] SOAData* soaData, const bool found)
 {
-  auto name = soaData->qname;
-
   if (found == (qtype == QType::DS) || target != shorter) {
-    DLOG(g_log << Logger::Error << "found: " << name << endl);
+    DLOG(g_log << Logger::Error << "found: " << soaData->qname << endl);
     return true;
   }
 
-  DLOG(g_log << Logger::Error << "chasing next: " << name << endl);
+  DLOG(g_log << Logger::Error << "chasing next: " << soaData->qname << endl);
   return false;
 }