diff --git a/src/ip.cpp b/src/ip.cpp index e4c941e1..98804e8c 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -210,6 +210,9 @@ void zmq::set_socket_priority (fd_t s_, int priority_) setsockopt (s_, SOL_SOCKET, SO_PRIORITY, reinterpret_cast (&priority_), sizeof (priority_)); errno_assert (rc == 0); +#else + LIBZMQ_UNUSED (s_); + LIBZMQ_UNUSED (priority_); #endif } diff --git a/src/zmq.cpp b/src/zmq.cpp index c6d35f34..b447d361 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -1739,6 +1739,8 @@ int zmq_proxy_steerable (void *frontend_, void *capture_, void *control_) { + LIBZMQ_UNUSED (capture_); + LIBZMQ_UNUSED (control_); if (!frontend_ || !backend_) { errno = EFAULT; return -1; diff --git a/src/zmtp_engine.cpp b/src/zmtp_engine.cpp index b8bbd49f..517959a0 100644 --- a/src/zmtp_engine.cpp +++ b/src/zmtp_engine.cpp @@ -371,6 +371,9 @@ bool zmq::zmtp_engine_t::handshake_v3_x (const bool downgrade_sub_) error (protocol_error); return false; } +#ifndef ZMQ_HAVE_CURVE + LIBZMQ_UNUSED (downgrade_sub_); +#endif _next_msg = &zmtp_engine_t::next_handshake_command; _process_msg = &zmtp_engine_t::process_handshake_command; diff --git a/tests/test_bind_fuzzer.cpp b/tests/test_bind_fuzzer.cpp index b99000d4..64c54a11 100644 --- a/tests/test_bind_fuzzer.cpp +++ b/tests/test_bind_fuzzer.cpp @@ -59,6 +59,9 @@ void test_bind_fuzzer () int main (int argc, char **argv) { + LIBZMQ_UNUSED (argc); + LIBZMQ_UNUSED (argv); + setup_test_environment (); UNITY_BEGIN (); diff --git a/tests/test_bind_null_fuzzer.cpp b/tests/test_bind_null_fuzzer.cpp index ca3c0c69..87c85a05 100644 --- a/tests/test_bind_null_fuzzer.cpp +++ b/tests/test_bind_null_fuzzer.cpp @@ -76,6 +76,8 @@ void test_bind_null_fuzzer () int main (int argc, char **argv) { + LIBZMQ_UNUSED (argc); + LIBZMQ_UNUSED (argv); setup_test_environment (); UNITY_BEGIN (); diff --git a/tests/test_connect_fuzzer.cpp b/tests/test_connect_fuzzer.cpp index 296ee9ca..5b421b6d 100644 --- a/tests/test_connect_fuzzer.cpp +++ b/tests/test_connect_fuzzer.cpp @@ -46,6 +46,9 @@ void test_connect_fuzzer () int main (int argc, char **argv) { + LIBZMQ_UNUSED (argc); + LIBZMQ_UNUSED (argv); + setup_test_environment (); UNITY_BEGIN (); diff --git a/tests/test_connect_null_fuzzer.cpp b/tests/test_connect_null_fuzzer.cpp index 30d92b0a..cb05777f 100644 --- a/tests/test_connect_null_fuzzer.cpp +++ b/tests/test_connect_null_fuzzer.cpp @@ -81,6 +81,9 @@ void test_connect_null_fuzzer () int main (int argc, char **argv) { + LIBZMQ_UNUSED (argc); + LIBZMQ_UNUSED (argv); + setup_test_environment (); UNITY_BEGIN (); diff --git a/tests/test_poller.cpp b/tests/test_poller.cpp index cc5723c8..c5d650b8 100644 --- a/tests/test_poller.cpp +++ b/tests/test_poller.cpp @@ -297,6 +297,7 @@ void call_poller_wait_all_null_event_fails_event_count_nonzero (void *poller_) void call_poller_wait_all_null_event_fails_event_count_zero (void *poller_) { + LIBZMQ_UNUSED (poller_); #if 0 // TODO this causes an assertion, which is not consistent if the number // of events may be 0, the pointer should be allowed to by NULL in that diff --git a/tests/test_reconnect_options.cpp b/tests/test_reconnect_options.cpp index 7eaa7812..af34934b 100644 --- a/tests/test_reconnect_options.cpp +++ b/tests/test_reconnect_options.cpp @@ -49,6 +49,7 @@ void reconnect_default () int rc = get_monitor_event_with_timeout (sub_mon, &event, &event_address, 2 * 1000); assert (rc == -1); + LIBZMQ_UNUSED (rc); // Close sub // TODO why does this use zero_linger? @@ -102,6 +103,7 @@ void reconnect_success () int rc = get_monitor_event_with_timeout (sub_mon, &event, &event_address, SETTLE_TIME); assert (rc == -1); + LIBZMQ_UNUSED (rc); // Now re-bind pub socket and wait for re-connect pub = test_context_socket (ZMQ_PUB); diff --git a/tests/test_socks.cpp b/tests/test_socks.cpp index 1c270544..33e9e396 100644 --- a/tests/test_socks.cpp +++ b/tests/test_socks.cpp @@ -77,6 +77,7 @@ int remote_connect (int socket, uint32_t addr, uint16_t port) void *setup_socks_server (char *socks_server_address, int socks_server_address_len) { + LIBZMQ_UNUSED (socks_server_address_len); fprintf (stderr, "socks_server: setup socks server\n"); int server_fd = bind_socket_resolve_port ("127.0.0.1", "0", socks_server_address); diff --git a/tests/test_spec_dealer.cpp b/tests/test_spec_dealer.cpp index ea055ce4..93b75b9a 100644 --- a/tests/test_spec_dealer.cpp +++ b/tests/test_spec_dealer.cpp @@ -141,6 +141,7 @@ void test_destroy_queue_on_disconnect (const char *bind_address_) // SHALL block on sending, or return a suitable error, when it has no connected peers. void test_block_on_send_no_peers (const char *bind_address_) { + LIBZMQ_UNUSED (bind_address_); void *sc = test_context_socket (ZMQ_DEALER); int timeout = 250; diff --git a/tests/test_spec_pushpull.cpp b/tests/test_spec_pushpull.cpp index b8baba82..72c2c3cb 100644 --- a/tests/test_spec_pushpull.cpp +++ b/tests/test_spec_pushpull.cpp @@ -126,6 +126,7 @@ void test_pull_fair_queue_in (const char *bind_address_) // available peers. void test_push_block_on_send_no_peers (const char *bind_address_) { + LIBZMQ_UNUSED (bind_address_); void *sc = test_context_socket (ZMQ_PUSH); int timeout = 250; diff --git a/unittests/unittest_curve_encoding.cpp b/unittests/unittest_curve_encoding.cpp index 62858504..01e8cb0a 100644 --- a/unittests/unittest_curve_encoding.cpp +++ b/unittests/unittest_curve_encoding.cpp @@ -31,11 +31,9 @@ void test_roundtrip (zmq::msg_t *msg_) + msg_->size ()); zmq::curve_encoding_t encoding_client ("CurveZMQMESSAGEC", - "CurveZMQMESSAGES", - false); + "CurveZMQMESSAGES", false); zmq::curve_encoding_t encoding_server ("CurveZMQMESSAGES", - "CurveZMQMESSAGEC", - false); + "CurveZMQMESSAGEC", false); uint8_t client_public[32]; uint8_t client_secret[32]; @@ -67,6 +65,8 @@ void test_roundtrip (zmq::msg_t *msg_) TEST_ASSERT_EQUAL_UINT8_ARRAY (&original[0], msg_->data (), original.size ()); } +#else + LIBZMQ_UNUSED (msg_); #endif } diff --git a/unittests/unittest_mtrie.cpp b/unittests/unittest_mtrie.cpp index dbf71c7d..1b976877 100644 --- a/unittests/unittest_mtrie.cpp +++ b/unittests/unittest_mtrie.cpp @@ -385,6 +385,9 @@ void check_count (zmq::generic_mtrie_t::prefix_t data_, size_t len_, int *count_) { + LIBZMQ_UNUSED (data_); + LIBZMQ_UNUSED (len_); + --(*count_); TEST_ASSERT_GREATER_OR_EQUAL (0, *count_); }