Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist-1.5.x: Fix building with LLVM11 #9543

Merged

Conversation

rgacogne
Copy link
Member

Short description

Backport of #9408 to dnsdist-1.5.x.

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.

(cherry picked from commit e7c6996)

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master

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.

(cherry picked from commit e7c6996)
@rgacogne rgacogne force-pushed the ddist15-fix-building-llvm-11 branch from 5a4ab0c to e6c0638 Compare September 28, 2020 10:41
@rgacogne rgacogne merged commit 879849e into PowerDNS:rel/dnsdist-1.5.x Sep 28, 2020
@rgacogne rgacogne deleted the ddist15-fix-building-llvm-11 branch September 28, 2020 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants