From 27eb476bcd6bef1479e78fab7541de60aa9a8096 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 1 Dec 2015 18:45:24 +0100 Subject: [PATCH] more const; disable useless compiler warning --- pdns/unix_utility.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()<