Skip to content

Commit

Permalink
remove redundant lock calls, use /* unused */
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Nov 29, 2024
1 parent b6a8c99 commit ea9e130
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
1 change: 0 additions & 1 deletion pdns/auth-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,6 @@ int main(int argc, char** argv)
{
versionSetProduct(ProductAuthoritative);
reportAllTypes(); // init MOADNSParser
DNSRecordContent::lock();

g_programname = "pdns";
g_starttime = time(nullptr);
Expand Down
9 changes: 3 additions & 6 deletions pdns/dnsrecords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<DNSRecordContent> EUI48RecordContent::make(const DNSRecord &dr, PacketReader& pr)
Expand Down Expand Up @@ -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<DNSRecordContent> EUI64RecordContent::make(const DNSRecord &dr, PacketReader& pr)
Expand Down Expand Up @@ -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");
}

Expand Down
12 changes: 4 additions & 8 deletions pdns/nsecrecords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down Expand Up @@ -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");
}

Expand Down Expand Up @@ -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");
}
Expand Down Expand Up @@ -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");
}

Expand Down
1 change: 0 additions & 1 deletion pdns/recursordist/rec-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3154,7 +3154,6 @@ int main(int argc, char** argv)
g_argv = argv;
versionSetProduct(ProductRecursor);
reportAllTypes();
DNSRecordContent::lock();

int ret = EXIT_SUCCESS;

Expand Down
3 changes: 1 addition & 2 deletions pdns/sillyrecords.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit ea9e130

Please sign in to comment.