diff --git a/src/blob.hpp b/src/blob.hpp index 71153705..a2edf11f 100644 --- a/src/blob.hpp +++ b/src/blob.hpp @@ -96,11 +96,10 @@ namespace std static char_type to_char_type(const int_type& __c) - { ((void)__c); return char_type(); } + { return char_type(); } static int_type - to_int_type(const char_type& __c) - { ((void)__c); return int_type(); } + to_int_type(const char_type& __c) { return int_type(); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) diff --git a/src/ctx.cpp b/src/ctx.cpp index 0cb0dde4..44fd0465 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -315,7 +315,6 @@ zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_) void zmq::ctx_t::log (const char *format_, va_list args_) { - ((void)args_); // Create the log message. msg_t msg; int rc = msg.init_size (strlen (format_) + 1); diff --git a/src/dist.cpp b/src/dist.cpp index dd4a8931..d220c438 100644 --- a/src/dist.cpp +++ b/src/dist.cpp @@ -128,7 +128,6 @@ int zmq::dist_t::send_to_matching (msg_t *msg_, int flags_) void zmq::dist_t::distribute (msg_t *msg_, int flags_) { - ((void)flags_); // If there are no matching pipes available, simply drop the message. if (matching == 0) { int rc = msg_->close (); diff --git a/src/err.cpp b/src/err.cpp index 6bb37aed..028d752e 100644 --- a/src/err.cpp +++ b/src/err.cpp @@ -65,7 +65,6 @@ const char *zmq::errno_to_string (int errno_) void zmq::zmq_abort(const char *errmsg_) { - ((void)errmsg_); #if defined ZMQ_HAVE_WINDOWS // Raise STATUS_FATAL_APP_EXIT. diff --git a/src/fq.cpp b/src/fq.cpp index adbdf385..429c0384 100644 --- a/src/fq.cpp +++ b/src/fq.cpp @@ -70,7 +70,6 @@ int zmq::fq_t::recv (msg_t *msg_, int flags_) int zmq::fq_t::recvpipe (msg_t *msg_, int flags_, pipe_t **pipe_) { - ((void)flags_); // Deallocate old content of the message. int rc = msg_->close (); errno_assert (rc == 0); diff --git a/src/io_object.cpp b/src/io_object.cpp index 6eefa110..81b9ce5a 100644 --- a/src/io_object.cpp +++ b/src/io_object.cpp @@ -89,7 +89,6 @@ void zmq::io_object_t::add_timer (int timeout_, int id_) void zmq::io_object_t::cancel_timer (int id_) { - ((void)id_); poller->cancel_timer (this, id_); } @@ -105,6 +104,5 @@ void zmq::io_object_t::out_event () void zmq::io_object_t::timer_event (int id_) { - ((void)id_); zmq_assert (false); } diff --git a/src/io_thread.cpp b/src/io_thread.cpp index cb87a5be..40bbef99 100644 --- a/src/io_thread.cpp +++ b/src/io_thread.cpp @@ -91,7 +91,6 @@ void zmq::io_thread_t::out_event () void zmq::io_thread_t::timer_event (int id_) { - ((void)id_); // No timers here. This function is never called. zmq_assert (false); } diff --git a/src/lb.cpp b/src/lb.cpp index 57df6df9..2a0f7693 100644 --- a/src/lb.cpp +++ b/src/lb.cpp @@ -73,7 +73,6 @@ void zmq::lb_t::activated (pipe_t *pipe_) int zmq::lb_t::send (msg_t *msg_, int flags_) { - ((void)flags_); // Drop the message if required. If we are at the end of the message // switch back to non-dropping mode. if (dropping) { diff --git a/src/object.cpp b/src/object.cpp index 465c8f65..622754cc 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -374,19 +374,16 @@ void zmq::object_t::process_plug () void zmq::object_t::process_own (own_t *object_) { - ((void)object_); zmq_assert (false); } void zmq::object_t::process_attach (i_engine *engine_) { - ((void)engine_); zmq_assert (false); } void zmq::object_t::process_bind (pipe_t *pipe_) { - ((void)pipe_); zmq_assert (false); } @@ -397,13 +394,11 @@ void zmq::object_t::process_activate_read () void zmq::object_t::process_activate_write (uint64_t msgs_read_) { - ((void)msgs_read_); zmq_assert (false); } void zmq::object_t::process_hiccup (void *pipe_) { - ((void)pipe_); zmq_assert (false); } @@ -419,13 +414,11 @@ void zmq::object_t::process_pipe_term_ack () void zmq::object_t::process_term_req (own_t *object_) { - ((void)object_); zmq_assert (false); } void zmq::object_t::process_term (int linger_) { - ((void)linger_); zmq_assert (false); } @@ -436,7 +429,6 @@ void zmq::object_t::process_term_ack () void zmq::object_t::process_reap (class socket_base_t *socket_) { - ((void)socket_); zmq_assert (false); } diff --git a/src/pair.cpp b/src/pair.cpp index a1b5220b..82fd39b5 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -38,7 +38,6 @@ zmq::pair_t::~pair_t () void zmq::pair_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (!pipe); pipe = pipe_; } @@ -51,14 +50,12 @@ void zmq::pair_t::xterminated (pipe_t *pipe_) void zmq::pair_t::xread_activated (pipe_t *pipe_) { - ((void)pipe_); // There's just one pipe. No lists of active and inactive pipes. // There's nothing to do here. } void zmq::pair_t::xwrite_activated (pipe_t *pipe_) { - ((void)pipe_); // There's just one pipe. No lists of active and inactive pipes. // There's nothing to do here. } @@ -82,7 +79,6 @@ int zmq::pair_t::xsend (msg_t *msg_, int flags_) int zmq::pair_t::xrecv (msg_t *msg_, int flags_) { - ((void)flags_); // Deallocate old content of the message. int rc = msg_->close (); errno_assert (rc == 0); diff --git a/src/pipe.cpp b/src/pipe.cpp index 537ccf1d..25dd51cc 100644 --- a/src/pipe.cpp +++ b/src/pipe.cpp @@ -148,7 +148,6 @@ bool zmq::pipe_t::read (msg_t *msg_) bool zmq::pipe_t::check_write (msg_t *msg_) { - ((void)msg_); if (unlikely (!out_active || state != active)) return false; diff --git a/src/pub.cpp b/src/pub.cpp index 77282058..7458d5f0 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -34,8 +34,6 @@ zmq::pub_t::~pub_t () int zmq::pub_t::xrecv (class msg_t *msg_, int flags_) { - ((void)msg_); - ((void)flags_); // Messages cannot be received from PUB socket. errno = ENOTSUP; return -1; diff --git a/src/pull.cpp b/src/pull.cpp index 6458b49a..ee840d91 100644 --- a/src/pull.cpp +++ b/src/pull.cpp @@ -36,7 +36,6 @@ zmq::pull_t::~pull_t () void zmq::pull_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (pipe_); fq.attach (pipe_); } diff --git a/src/push.cpp b/src/push.cpp index 01a965a9..2a29d353 100644 --- a/src/push.cpp +++ b/src/push.cpp @@ -36,7 +36,6 @@ zmq::push_t::~push_t () void zmq::push_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (pipe_); lb.attach (pipe_); } diff --git a/src/reaper.cpp b/src/reaper.cpp index c9fa45a9..716f6380 100644 --- a/src/reaper.cpp +++ b/src/reaper.cpp @@ -80,7 +80,6 @@ void zmq::reaper_t::out_event () void zmq::reaper_t::timer_event (int id_) { - ((void)id_); zmq_assert (false); } diff --git a/src/session_base.cpp b/src/session_base.cpp index b359748a..f2ee7139 100644 --- a/src/session_base.cpp +++ b/src/session_base.cpp @@ -248,7 +248,6 @@ void zmq::session_base_t::write_activated (pipe_t *pipe_) void zmq::session_base_t::hiccuped (pipe_t *pipe_) { - ((void)pipe_); // Hiccups are always sent from session to socket, not the other // way round. zmq_assert (false); diff --git a/src/socket_base.cpp b/src/socket_base.cpp index fc73ce9c..d9bfd484 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -763,9 +763,6 @@ void zmq::socket_base_t::process_destroy () int zmq::socket_base_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { - ((void)option_); - ((void)optval_); - ((void)optvallen_); errno = EINVAL; return -1; } @@ -777,8 +774,6 @@ bool zmq::socket_base_t::xhas_out () int zmq::socket_base_t::xsend (msg_t *msg_, int flags_) { - ((void)msg_); - ((void)flags_); errno = ENOTSUP; return -1; } @@ -790,26 +785,21 @@ bool zmq::socket_base_t::xhas_in () int zmq::socket_base_t::xrecv (msg_t *msg_, int flags_) { - ((void)msg_); - ((void)flags_); errno = ENOTSUP; return -1; } void zmq::socket_base_t::xread_activated (pipe_t *pipe_) { - ((void)pipe_); zmq_assert (false); } void zmq::socket_base_t::xwrite_activated (pipe_t *pipe_) { - ((void)pipe_); zmq_assert (false); } void zmq::socket_base_t::xhiccuped (pipe_t *pipe_) { - ((void)pipe_); zmq_assert (false); } @@ -830,7 +820,6 @@ void zmq::socket_base_t::out_event () void zmq::socket_base_t::timer_event (int id_) { - ((void)id_); zmq_assert (false); } diff --git a/src/sub.cpp b/src/sub.cpp index 05609d12..3249aeab 100644 --- a/src/sub.cpp +++ b/src/sub.cpp @@ -69,8 +69,6 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_, int zmq::sub_t::xsend (msg_t *msg_, int flags_) { - ((void)msg_); - ((void)flags_); // Overload the XSUB's send. errno = ENOTSUP; return -1; diff --git a/src/xpub.cpp b/src/xpub.cpp index 00d68d1d..717e26c4 100644 --- a/src/xpub.cpp +++ b/src/xpub.cpp @@ -136,7 +136,6 @@ bool zmq::xpub_t::xhas_out () int zmq::xpub_t::xrecv (msg_t *msg_, int flags_) { - ((void)flags_); // If there is at least one if (pending.empty ()) { errno = EAGAIN; diff --git a/src/xrep.cpp b/src/xrep.cpp index 67b5d8c1..4d9e5937 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -57,7 +57,6 @@ zmq::xrep_t::~xrep_t () void zmq::xrep_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (pipe_); // Generate a new unique peer identity. @@ -114,7 +113,6 @@ void zmq::xrep_t::xwrite_activated (pipe_t *pipe_) int zmq::xrep_t::xsend (msg_t *msg_, int flags_) { - ((void)flags_); // If this is the first part of the message it's the ID of the // peer to send the message to. if (!more_out) { diff --git a/src/xreq.cpp b/src/xreq.cpp index 5dd410ff..13809d9f 100644 --- a/src/xreq.cpp +++ b/src/xreq.cpp @@ -48,7 +48,6 @@ zmq::xreq_t::~xreq_t () void zmq::xreq_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (pipe_); fq.attach (pipe_); lb.attach (pipe_); diff --git a/src/xsub.cpp b/src/xsub.cpp index 5f4ad6c1..80ca1f2d 100644 --- a/src/xsub.cpp +++ b/src/xsub.cpp @@ -47,7 +47,6 @@ zmq::xsub_t::~xsub_t () void zmq::xsub_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) { - ((void)icanhasall_); zmq_assert (pipe_); fq.attach (pipe_); dist.attach (pipe_);