From: Peter van Dijk Date: Tue, 1 Dec 2015 17:45:24 +0000 (+0100) Subject: more const; disable useless compiler warning X-Git-Tag: dnsdist-1.0.0-alpha1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27eb476bcd6bef1479e78fab7541de60aa9a8096;p=thirdparty%2Fpdns.git more const; disable useless compiler warning --- diff --git a/pdns/unix_utility.cc b/pdns/unix_utility.cc index 24b3df0b4d..ed58314d05 100644 --- a/pdns/unix_utility.cc +++ b/pdns/unix_utility.cc @@ -80,8 +80,9 @@ int Utility::timed_connect( Utility::sock_t sock, void Utility::setBindAny(int af, sock_t sock) { - int one = 1; + const int one = 1; + (void) one; // avoids 'unused var' warning on systems that have none of the defines checked below #ifdef IP_FREEBIND if (setsockopt(sock, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)) < 0) theL()<