]> granicus.if.org Git - pdns/commitdiff
dnsdist: Fix warnings, mostly unused parameters, reported by -Wextra
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 8 Nov 2018 13:30:19 +0000 (14:30 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 8 Nov 2018 13:30:19 +0000 (14:30 +0100)
pdns/dnsdist-web.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsdistdist/tcpiohandler.cc

index cabd48aeb77899639fbb57807f1f2ab8b8dc6419..8cd977384f867510b2c38eeaed5b98d1bc786c93 100644 (file)
@@ -68,7 +68,7 @@ static bool apiWriteConfigFile(const string& filebasename, const string& content
 static void apiSaveACL(const NetmaskGroup& nmg)
 {
   vector<string> vec;
-  g_ACL.getLocal()->toStringVector(&vec);
+  nmg.toStringVector(&vec);
 
   string acl;
   for(const auto& s : vec) {
index 115b0f707ee59f617403e0477f574f41f8baf6ba..06512bc240bd8b65ed97bc81f05c94646fe1cb94 100644 (file)
@@ -565,22 +565,22 @@ try {
       vinfolog("Got an error in UDP responder thread while parsing a response from %s, id %d: %s", dss->remote.toStringWithPort(), queryId, e.what());
     }
   }
-  return 0;
+  return nullptr;
 }
 catch(const std::exception& e)
 {
   errlog("UDP responder thread died because of exception: %s", e.what());
-  return 0;
+  return nullptr;
 }
 catch(const PDNSException& e)
 {
   errlog("UDP responder thread died because of PowerDNS exception: %s", e.reason);
-  return 0;
+  return nullptr;
 }
 catch(...)
 {
   errlog("UDP responder thread died because of an exception: %s", "unknown");
-  return 0;
+  return nullptr;
 }
 
 bool DownstreamState::reconnect()
@@ -1888,7 +1888,7 @@ void* maintThread()
 
     // ponder pruning g_dynblocks of expired entries here
   }
-  return 0;
+  return nullptr;
 }
 
 static void* secPollThread()
@@ -1994,7 +1994,7 @@ static void* healthChecksThread()
       }
     }
   }
-  return 0;
+  return nullptr;
 }
 
 static void bindAny(int af, int sock)
index 096ff8d8e590b01a6f15f1e7b5fd42bc7d684524..34523acc38082b5ca8e7e7198d1123bdddd414a6 100644 (file)
@@ -410,7 +410,7 @@ public:
   {
   }
 
-  BasicQPSLimiter(unsigned int rate, unsigned int burst): d_tokens(burst)
+  BasicQPSLimiter(unsigned int burst): d_tokens(burst)
   {
     d_prev.start();
   }
@@ -451,7 +451,7 @@ public:
   {
   }
 
-  QPSLimiter(unsigned int rate, unsigned int burst): BasicQPSLimiter(rate, burst), d_rate(rate), d_burst(burst), d_passthrough(false)
+  QPSLimiter(unsigned int rate, unsigned int burst): BasicQPSLimiter(burst), d_rate(rate), d_burst(burst), d_passthrough(false)
   {
     d_prev.start();
   }
index 4293aa70aab4e67400bcf1baa445d776603331af..e91cf6bd235dc82be0e07d499c854a2bea3cc416 100644 (file)
@@ -506,7 +506,7 @@ public:
     d_ticketKeys.addKey(newKey);
 
     if (d_ticketsKeyRotationDelay > 0) {
-      d_ticketsKeyNextRotation = time(nullptr) + d_ticketsKeyRotationDelay;
+      d_ticketsKeyNextRotation = now + d_ticketsKeyRotationDelay;
     }
   }
 
@@ -840,7 +840,7 @@ public:
     auto newKey = std::make_shared<GnuTLSTicketsKey>();
     d_ticketsKey = newKey;
     if (d_ticketsKeyRotationDelay > 0) {
-      d_ticketsKeyNextRotation = time(nullptr) + d_ticketsKeyRotationDelay;
+      d_ticketsKeyNextRotation = now + d_ticketsKeyRotationDelay;
     }
   }