From 29f1f39df323a8b5d64d759412d9faa9beb03aa1 Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Wed, 30 May 2018 22:11:07 +0200 Subject: [PATCH] Problem: unused parameter warning Solution: mark parameter as unused depending on platform definitions --- src/ip.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ip.cpp b/src/ip.cpp index 4c527382..8f3a53e4 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -667,14 +667,14 @@ void zmq::make_socket_noninheritable (fd_t sock_) const BOOL brc = SetHandleInformation (reinterpret_cast (sock_), HANDLE_FLAG_INHERIT, 0); win_assert (brc); -#endif - -#if (!defined ZMQ_HAVE_SOCK_CLOEXEC || !defined HAVE_ACCEPT4) \ +#elif (!defined ZMQ_HAVE_SOCK_CLOEXEC || !defined HAVE_ACCEPT4) \ && defined FD_CLOEXEC // If there 's no SOCK_CLOEXEC, let's try the second best option. // Race condition can cause socket not to be closed (if fork happens // between accept and this point). const int rc = fcntl (sock_, F_SETFD, FD_CLOEXEC); errno_assert (rc != -1); +#else + LIBZMQ_UNUSED (sock_); #endif }