From: Rosen Penev Date: Thu, 5 Nov 2020 08:02:52 +0000 (-0800) Subject: clang-tidy: remove pointless void X-Git-Tag: dnsdist-1.6.0-alpha2~55^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e52fb6a4b8d0ce4a944e2ebcafb26edb6e0d3075;p=thirdparty%2Fpdns.git clang-tidy: remove pointless void Found with modernize-redundant-void-arg Signed-off-by: Rosen Penev --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index fe21fa06a1..06cce20f3f 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -298,7 +298,7 @@ static uint64_t getLatency(const std::string& str) return round(avg_latency); } -void declareStats(void) +void declareStats() { S.declare("udp-queries","Number of UDP queries received"); S.declare("udp-do-queries","Number of UDP queries received with DO bit"); diff --git a/pdns/communicator.cc b/pdns/communicator.cc index 07fde254e4..a1ba12a406 100644 --- a/pdns/communicator.cc +++ b/pdns/communicator.cc @@ -40,7 +40,7 @@ #include "threadname.hh" // there can be MANY OF THESE -void CommunicatorClass::retrievalLoopThread(void) +void CommunicatorClass::retrievalLoopThread() { setThreadName("pdns/comm-retre"); for(;;) { @@ -107,7 +107,7 @@ void CommunicatorClass::go() loadArgsIntoSet("forward-notify", PacketHandler::s_forwardNotify); } -void CommunicatorClass::mainloop(void) +void CommunicatorClass::mainloop() { try { setThreadName("pdns/comm-main"); diff --git a/pdns/dnsproxy.cc b/pdns/dnsproxy.cc index 64d1322247..0f03334830 100644 --- a/pdns/dnsproxy.cc +++ b/pdns/dnsproxy.cc @@ -184,7 +184,7 @@ int DNSProxy::getID_locked() } } -void DNSProxy::mainloop(void) +void DNSProxy::mainloop() { setThreadName("pdns/dnsproxy"); try { diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 90ef4aa07b..d7a79abf33 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -418,7 +418,7 @@ boilerplate_conv(RKEY, 57, RKEYRecordContent::RKEYRecordContent() {} /* EUI48 start */ -void EUI48RecordContent::report(void) +void EUI48RecordContent::report() { regist(1, QType::EUI48, &make, &make, "EUI48"); } @@ -461,7 +461,7 @@ string EUI48RecordContent::getZoneRepresentation(bool noDot) const /* EUI64 start */ -void EUI64RecordContent::report(void) +void EUI64RecordContent::report() { regist(1, QType::EUI64, &make, &make, "EUI64"); } @@ -506,7 +506,7 @@ string EUI64RecordContent::getZoneRepresentation(bool noDot) const /* APL start */ /* https://tools.ietf.org/html/rfc3123 */ -void APLRecordContent::report(void) +void APLRecordContent::report() { regist(1, QType::APL, &make, &make, "APL"); } diff --git a/pdns/nsecrecords.cc b/pdns/nsecrecords.cc index 7f340d9a8b..15a613b6b1 100644 --- a/pdns/nsecrecords.cc +++ b/pdns/nsecrecords.cc @@ -164,7 +164,7 @@ string NSECBitmap::getZoneRepresentation() const return ret; } -void NSECRecordContent::report(void) +void NSECRecordContent::report() { regist(1, 47, &make, &make, "NSEC"); } @@ -213,7 +213,7 @@ string NSECRecordContent::getZoneRepresentation(bool noDot) const ////// begin of NSEC3 -void NSEC3RecordContent::report(void) +void NSEC3RecordContent::report() { regist(1, 50, &make, &make, "NSEC3"); } @@ -286,7 +286,7 @@ string NSEC3RecordContent::getZoneRepresentation(bool noDot) const } -void NSEC3PARAMRecordContent::report(void) +void NSEC3PARAMRecordContent::report() { regist(1, 51, &make, &make, "NSEC3PARAM"); regist(254, 51, &make, &make, "NSEC3PARAM"); diff --git a/pdns/receiver.cc b/pdns/receiver.cc index 084dfe9a5f..c68c192925 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -101,7 +101,7 @@ const char *funnytext= This file is where it all happens - main is here, as are the two pivotal threads qthread() and athread() */ -static void daemonize(void) +static void daemonize() { if(fork()) exit(0); // bye bye @@ -129,7 +129,7 @@ static void takedown(int i) } } -static void writePid(void) +static void writePid() { if(!::arg().mustDo("write-pid")) return; diff --git a/pdns/sillyrecords.cc b/pdns/sillyrecords.cc index acb42cb5d3..f6197bf17f 100644 --- a/pdns/sillyrecords.cc +++ b/pdns/sillyrecords.cc @@ -153,7 +153,7 @@ latlon2ul(const char **latlonstrptr, int *which) return (retval); } -void LOCRecordContent::report(void) +void LOCRecordContent::report() { regist(1, QType::LOC, &make, &make, "LOC"); regist(254, QType::LOC, &make, &make, "LOC"); diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index cc4d1d0ed9..4df720760c 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -94,7 +94,7 @@ bool UeberBackend::loadModules(const vector& modules, const string& path return true; } -void UeberBackend::go(void) +void UeberBackend::go() { if (::arg().mustDo("consistent-backends")) { s_doANYLookupsOnly = true; diff --git a/pdns/unix_utility.cc b/pdns/unix_utility.cc index 4cef1e5709..a3992b5e7f 100644 --- a/pdns/unix_utility.cc +++ b/pdns/unix_utility.cc @@ -166,7 +166,7 @@ void Utility::dropUserPrivs( uid_t uid ) // Returns the current process id. -Utility::pid_t Utility::getpid( void ) +Utility::pid_t Utility::getpid( ) { return ::getpid(); } @@ -179,7 +179,7 @@ int Utility::gettimeofday( struct timeval *tv, void *tz ) } // Sets the random seed. -void Utility::srandom(void) +void Utility::srandom() { struct timeval tv; gettimeofday(&tv, 0);