mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Problem: unused parameter warning
Solution: mark parameter as unused depending on platform definitions
This commit is contained in:
parent
b59d7d574d
commit
29f1f39df3
@ -667,14 +667,14 @@ void zmq::make_socket_noninheritable (fd_t sock_)
|
|||||||
const BOOL brc = SetHandleInformation (reinterpret_cast<HANDLE> (sock_),
|
const BOOL brc = SetHandleInformation (reinterpret_cast<HANDLE> (sock_),
|
||||||
HANDLE_FLAG_INHERIT, 0);
|
HANDLE_FLAG_INHERIT, 0);
|
||||||
win_assert (brc);
|
win_assert (brc);
|
||||||
#endif
|
#elif (!defined ZMQ_HAVE_SOCK_CLOEXEC || !defined HAVE_ACCEPT4) \
|
||||||
|
|
||||||
#if (!defined ZMQ_HAVE_SOCK_CLOEXEC || !defined HAVE_ACCEPT4) \
|
|
||||||
&& defined FD_CLOEXEC
|
&& defined FD_CLOEXEC
|
||||||
// If there 's no SOCK_CLOEXEC, let's try the second best option.
|
// 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
|
// Race condition can cause socket not to be closed (if fork happens
|
||||||
// between accept and this point).
|
// between accept and this point).
|
||||||
const int rc = fcntl (sock_, F_SETFD, FD_CLOEXEC);
|
const int rc = fcntl (sock_, F_SETFD, FD_CLOEXEC);
|
||||||
errno_assert (rc != -1);
|
errno_assert (rc != -1);
|
||||||
|
#else
|
||||||
|
LIBZMQ_UNUSED (sock_);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user