mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-15 15:16:52 +02:00
Silence all "unused parameter" warnings from Clang.
Compiling without warnings is a good goal, because it makes new warnings (which probably indicate bugs) stand out rather than getting lost in the spam. My fixes fall into two categories: - Adding (void) casts of unused parameters, where their unusedness seems like a TODO (or in some cases a bug?). - Removing parameter names altogether, where the function is clearly a stub that will never use its parameters. Should be no change in behavior.
This commit is contained in:
@@ -63,6 +63,15 @@ void zmq::tune_tcp_socket (fd_t s_)
|
||||
|
||||
void zmq::tune_tcp_keepalives (fd_t s_, int keepalive_, int keepalive_cnt_, int keepalive_idle_, int keepalive_intvl_)
|
||||
{
|
||||
// These options are used only under certain #ifdefs below.
|
||||
(void)keepalive_;
|
||||
(void)keepalive_cnt_;
|
||||
(void)keepalive_idle_;
|
||||
(void)keepalive_intvl_;
|
||||
|
||||
// If none of the #ifdefs apply, then s_ is unused.
|
||||
(void)s_;
|
||||
|
||||
// Tuning TCP keep-alives if platform allows it
|
||||
// All values = -1 means skip and leave it for OS
|
||||
#ifdef ZMQ_HAVE_SO_KEEPALIVE
|
||||
|
Reference in New Issue
Block a user