]> git.ipfire.org Git - thirdparty/pdns.git/commit
auth: Fix a 'temporary used in loop' warning reported by g++ 11.1.0 10429/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 19 May 2021 17:44:12 +0000 (19:44 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 19 May 2021 17:44:12 +0000 (19:44 +0200)
commit844535e5d70a2764b3bd03320c31ae0a4f5cce9c
treee6e31e10387eda16d1d12f49eee528701b61f161
parent9003e375f5bef7860cd2a9d7e3248a8005841d5a
auth: Fix a 'temporary used in loop' warning reported by g++ 11.1.0

```
common_startup.cc: In function ‘void mainthread()’:
common_startup.cc:617:24: warning: loop variable ‘algotype’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Wrange-loop-construct]
  617 |     for (const string& algotype : {"ksk", "zsk"}) {
      |                        ^~~~~~~~
common_startup.cc:617:24: note: use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying
```
pdns/common_startup.cc