Skip to content

Commit

Permalink
dnsdist: Fix a few "unused parameter" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Sep 25, 2024
1 parent 69001dc commit 20b5e3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pdns/dnsdistdist/dnsdist-lbpolicies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ template <class T> static std::shared_ptr<DownstreamState> getLeastOutstanding(c
// get server with least outstanding queries, and within those, with the lowest order, and within those: the fastest
shared_ptr<DownstreamState> leastOutstanding(const ServerPolicy::NumberedServerVector& servers, const DNSQuestion* dq)
{
(void)dq;
using LeastOutstandingType = std::tuple<int,int,double>;

if (servers.size() == 1 && servers[0].second->isUp()) {
Expand Down Expand Up @@ -150,6 +151,7 @@ static shared_ptr<DownstreamState> valrandom(const unsigned int val, const Serve

shared_ptr<DownstreamState> wrandom(const ServerPolicy::NumberedServerVector& servers, const DNSQuestion* dq)
{
(void)dq;
return valrandom(dns_random_uint32(), servers);
}

Expand Down Expand Up @@ -230,6 +232,7 @@ shared_ptr<DownstreamState> chashed(const ServerPolicy::NumberedServerVector& se

shared_ptr<DownstreamState> roundrobin(const ServerPolicy::NumberedServerVector& servers, const DNSQuestion* dq)
{
(void)dq;
if (servers.empty()) {
return shared_ptr<DownstreamState>();
}
Expand Down
4 changes: 2 additions & 2 deletions pdns/dnsdistdist/dnsdist-lua.hh
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ public:
{
}

DNSResponseAction::Action operator()(DNSResponse* dr, std::string* ruleresult) const override
DNSResponseAction::Action operator()(DNSResponse* dr, [[maybe_unused]] std::string* ruleresult) const override
{
auto visitor = [&](uint8_t section, uint16_t qclass, uint16_t qtype, uint32_t ttl) {
auto visitor = [&]([[maybe_unused]] uint8_t section, uint16_t qclass, uint16_t qtype, uint32_t ttl) {
if (!d_types.empty() && qclass == QClass::IN && d_types.count(qtype) == 0) {
return ttl;
}
Expand Down

0 comments on commit 20b5e3f

Please sign in to comment.