From 46b02338e38ac79d6ae4e41b7c3acf5fe34fd16a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 30 Jan 2016 02:44:09 -0500 Subject: [PATCH] Style: Fix -Wunused-but-set-variable in test_stream_exceeds_buffer.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit addresses the following warnings reported on gcc 5.2.1. In the future, this will help reduce the "noise" and help catch warnings revealing a serious problem. 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- /path/to/libzmq/tests/test_stream_exceeds_buffer.cpp: In function ‘int main()’: /path/to/libzmq/tests/test_stream_exceeds_buffer.cpp:19:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc = setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)); ^ 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- --- tests/test_stream_exceeds_buffer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_stream_exceeds_buffer.cpp b/tests/test_stream_exceeds_buffer.cpp index 124a84aa..d3604dca 100644 --- a/tests/test_stream_exceeds_buffer.cpp +++ b/tests/test_stream_exceeds_buffer.cpp @@ -77,5 +77,7 @@ int main() assert(rcvbuf[2]==0xbe); assert(rcvbuf[1]==0xad); assert(rcvbuf[0]==0xde); + + (void)(rc); // avoid -Wunused-but-set-variable warning in release build }