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: dnsdist-1.1.0-beta2~142^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ce9e4e67dbe8ce2cf546f5f549c3fb638946c56;p=pdns 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) --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index ac8555081..f26891570 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 c18c1f75a..5ae781db1 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);