]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix building with LLVM11 9408/head
authorRvdE <tremere@cainites.net>
Sun, 23 Aug 2020 22:26:21 +0000 (00:26 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Aug 2020 22:26:21 +0000 (00:26 +0200)
There's a typo on line 529, where it says "true", but the double quotes cause a type cast error on LLVM11.

dnsdist-console.cc:529:32: error: type 'const char [5]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
  { "SetNegativeAndSOAAction", "true", "nxd, zone, ttl, mname, rname, serial, refresh, retry, expire, minimum [, options]", "Turn a query into a NXDomain or NoData answer and sets a SOA record in the additional section" },
                               ^~~~~~
dnsdist-console.cc:529:32: note: insert an explicit cast to silence this issue
  { "SetNegativeAndSOAAction", "true", "nxd, zone, ttl, mname, rname, serial, refresh, retry, expire, minimum [, options]", "Turn a query into a NXDomain or NoData answer and sets a SOA record in the additional section" },
                               ^~~~~~
                               static_cast<bool>( )
1 error generated.

pdns/dnsdist-console.cc

index d68eb6b58ffd81d901151c76c99d6fd6a7ae8f10..4425f5f8790939beb93925f73d0682e58cff571e 100644 (file)
@@ -526,7 +526,7 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
   { "setMaxTCPQueriesPerConnection", true, "n", "set the maximum number of queries in an incoming TCP connection. 0 means unlimited" },
   { "setMaxTCPQueuedConnections", true, "n", "set the maximum number of TCP connections queued (waiting to be picked up by a client thread)" },
   { "setMaxUDPOutstanding", true, "n", "set the maximum number of outstanding UDP queries to a given backend server. This can only be set at configuration time and defaults to 65535" },
-  { "SetNegativeAndSOAAction", "true", "nxd, zone, ttl, mname, rname, serial, refresh, retry, expire, minimum [, options]", "Turn a query into a NXDomain or NoData answer and sets a SOA record in the additional section" },
+  { "SetNegativeAndSOAAction", true, "nxd, zone, ttl, mname, rname, serial, refresh, retry, expire, minimum [, options]", "Turn a query into a NXDomain or NoData answer and sets a SOA record in the additional section" },
   { "setPayloadSizeOnSelfGeneratedAnswers", true, "payloadSize", "set the UDP payload size advertised via EDNS on self-generated responses" },
   { "setPoolServerPolicy", true, "policy, pool", "set the server selection policy for this pool to that policy" },
   { "setPoolServerPolicyLua", true, "name, func, pool", "set the server selection policy for this pool to one named 'name' and provided by 'function'" },