From ea9e130b427fb4f109ea34763a21ffaa04d88b66 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 29 Nov 2024 10:03:21 +0100 Subject: [PATCH] remove redundant lock calls, use /* unused */ --- pdns/auth-main.cc | 1 - pdns/dnsrecords.cc | 9 +++------ pdns/nsecrecords.cc | 12 ++++-------- pdns/recursordist/rec-main.cc | 1 - pdns/sillyrecords.cc | 3 +-- 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index cc8eead13604..06d874249969 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -1210,7 +1210,6 @@ int main(int argc, char** argv) { versionSetProduct(ProductAuthoritative); reportAllTypes(); // init MOADNSParser - DNSRecordContent::lock(); g_programname = "pdns"; g_starttime = time(nullptr); diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 90f80c514884..72311fd51ef8 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -458,9 +458,8 @@ boilerplate_conv(LP, conv.xfrName(d_fqdn, false);) /* EUI48 start */ -void EUI48RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void EUI48RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, QType::EUI48, &make, &make, "EUI48"); } std::shared_ptr EUI48RecordContent::make(const DNSRecord &dr, PacketReader& pr) @@ -503,9 +502,8 @@ string EUI48RecordContent::getZoneRepresentation(bool /* noDot */) const /* EUI64 start */ -void EUI64RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void EUI64RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, QType::EUI64, &make, &make, "EUI64"); } std::shared_ptr EUI64RecordContent::make(const DNSRecord &dr, PacketReader& pr) @@ -550,9 +548,8 @@ string EUI64RecordContent::getZoneRepresentation(bool /* noDot */) const /* APL start */ /* https://tools.ietf.org/html/rfc3123 */ -void APLRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void APLRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, QType::APL, &make, &make, "APL"); } diff --git a/pdns/nsecrecords.cc b/pdns/nsecrecords.cc index ec030d98c115..eadeebb696b2 100644 --- a/pdns/nsecrecords.cc +++ b/pdns/nsecrecords.cc @@ -164,9 +164,8 @@ string NSECBitmap::getZoneRepresentation() const return ret; } -void NSECRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void NSECRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, 47, &make, &make, "NSEC"); } @@ -214,9 +213,8 @@ string NSECRecordContent::getZoneRepresentation(bool /* noDot */) const ////// begin of NSEC3 -void NSEC3RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void NSEC3RecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, 50, &make, &make, "NSEC3"); } @@ -288,9 +286,8 @@ string NSEC3RecordContent::getZoneRepresentation(bool /* noDot */) const } -void NSEC3PARAMRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void NSEC3PARAMRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, 51, &make, &make, "NSEC3PARAM"); regist(254, 51, &make, &make, "NSEC3PARAM"); } @@ -346,9 +343,8 @@ string NSEC3PARAMRecordContent::getZoneRepresentation(bool /* noDot */) const ////// begin of CSYNC -void CSYNCRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void CSYNCRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, 62, &make, &make, "CSYNC"); } diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 3e0954570349..af4fba33ed5f 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -3154,7 +3154,6 @@ int main(int argc, char** argv) g_argv = argv; versionSetProduct(ProductRecursor); reportAllTypes(); - DNSRecordContent::lock(); int ret = EXIT_SUCCESS; diff --git a/pdns/sillyrecords.cc b/pdns/sillyrecords.cc index 9ac84b6eb7f1..cc04a3c29f39 100644 --- a/pdns/sillyrecords.cc +++ b/pdns/sillyrecords.cc @@ -156,9 +156,8 @@ latlon2ul(const char **latlonstrptr, int *which) return (retval); } -void LOCRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& guard) +void LOCRecordContent::report(const ReportIsOnlyCallableByReportAllTypes& /* unused */) { - (void)guard; regist(1, QType::LOC, &make, &make, "LOC"); regist(254, QType::LOC, &make, &make, "LOC"); }