]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Avoid a few unused vars reported by g++-15
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 17 Dec 2025 14:26:41 +0000 (15:26 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 17 Dec 2025 14:33:08 +0000 (15:33 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/rec-nsspeeds.cc
pdns/zonemd.cc

index 7ba3df459a7d37f3935c44f4e7ceea54d76a561d..112addc4b96943e4a506db507a0f29153c89b7ae 100644 (file)
@@ -152,7 +152,7 @@ size_t nsspeeds_t::putPB(time_t cutoff, const std::string& pbuf)
   log->info(Logr::Debug, "Processing nsspeed dump");
 
   protozero::pbf_message<PBNSSpeedDump> full(pbuf);
-  size_t count = 0;
+  size_t theCount = 0;
   size_t inserted = 0;
   try {
     bool protocolVersionSeen = false;
@@ -199,12 +199,12 @@ size_t nsspeeds_t::putPB(time_t cutoff, const std::string& pbuf)
         if (putPBEntry(cutoff, message)) {
           ++inserted;
         }
-        ++count;
+        ++theCount;
         break;
       }
       }
     }
-    log->info(Logr::Info, "Processed nsspeed dump", "processed", Logging::Loggable(count), "inserted", Logging::Loggable(inserted));
+    log->info(Logr::Info, "Processed nsspeed dump", "processed", Logging::Loggable(theCount), "inserted", Logging::Loggable(inserted));
     return inserted;
   }
   catch (const std::runtime_error& e) {
index 99a386e3d4748246ea6e16bf076713da972208fd..cf20b606e9e86136146ebc2a05addeeb22759324 100644 (file)
@@ -259,8 +259,8 @@ void pdns::ZoneMD::verify(bool& validationDone, bool& validationOK)
   }
 
   // Final verify
-  for (const auto& [k, v] : d_zonemdRecords) {
-    auto [zonemd, duplicate] = v;
+  for (const auto& record : d_zonemdRecords) {
+    auto zonemd = record.second.record;
     if (zonemd->d_hashalgo == 1) {
       validationDone = true;
       auto computed = sha384digest->digest();