[zeromq-dev] [czmq] src/zsocket.c, this looks like unused variable to me
Gilles J. Seguin
segg2 at videotron.ca
Thu Jul 12 06:42:23 CEST 2012
fedora gcc-4.7.0-5.fc17.x86_64
$ gcc -I../include -Werror -Wno-unused -Wall -c zsocket.c -o zsocket.o
zsocket.c: In function ‘zsocket_poll’:
zsocket.c:152:9: error: unused variable ‘rc’ [-Werror=unused-variable]
cc1: all warnings being treated as errors
src/zsocket.c
@@ -149,7 +149,7 @@ Bool
zsocket_poll (void *socket, int msecs)
{
zmq_pollitem_t items [] = { { socket, 0, ZMQ_POLLIN, 0 } };
- int rc = zmq_poll (items, 1, msecs);
+ /*int rc =*/ zmq_poll (items, 1, msecs);
return (items [0].revents & ZMQ_POLLIN) != 0;
}
curious thing, -Wall option just before the -c option
More information about the zeromq-dev
mailing list