From: Christian Hofstaedtler Date: Fri, 2 Sep 2016 19:52:36 +0000 (+0200) Subject: Fix warning: types may not be defined in a for-range-declaration X-Git-Tag: auth-4.0.2~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a59ad3704c863f06a75581dce8378aaf7195eeb;p=thirdparty%2Fpdns.git Fix warning: types may not be defined in a for-range-declaration As emitted by gcc 6.2.0 20160830 (Debian 6.2.0-2) (cherry picked from commit 8ce9e4e67dbe8ce2cf546f5f549c3fb638946c56) --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index c2d72f86a1..dc180b3b1c 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -2789,7 +2789,7 @@ loadMainConfig(g_vm["config-dir"].as()); std::vector keys; UeberBackend B("default"); if (B.getTSIGKeys(keys)) { - for(const struct TSIGKey &key : keys) { + for(const TSIGKey &key : keys) { cout << key.name.toString() << " " << key.algorithm.toString() << " " << key.key << endl; } } diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index c18c1f75a9..5ae781db17 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -1280,7 +1280,7 @@ void TCPNameserver::thread() continue; int sock=-1; - for(const struct pollfd& pfd : d_prfds) { + for(const pollfd& pfd : d_prfds) { if(pfd.revents == POLLIN) { sock = pfd.fd; addrlen=sizeof(remote);