mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 01:37:56 +08:00
Style: Fix -Wunused-but-set-variable in test_stream_exceeds_buffer.cpp
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<---
This commit is contained in:
parent
f329252dcb
commit
46b02338e3
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user