From: Otto Moerbeek Date: Wed, 17 Dec 2025 14:26:41 +0000 (+0100) Subject: Avoid a few unused vars reported by g++-15 X-Git-Tag: rec-5.4.0-beta1~56^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a607aedf3d3721bb561f033f1337ea2afefd956;p=thirdparty%2Fpdns.git Avoid a few unused vars reported by g++-15 Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/rec-nsspeeds.cc b/pdns/recursordist/rec-nsspeeds.cc index 7ba3df459a..112addc4b9 100644 --- a/pdns/recursordist/rec-nsspeeds.cc +++ b/pdns/recursordist/rec-nsspeeds.cc @@ -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 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) { diff --git a/pdns/zonemd.cc b/pdns/zonemd.cc index 99a386e3d4..cf20b606e9 100644 --- a/pdns/zonemd.cc +++ b/pdns/zonemd.cc @@ -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();