[Libwebsockets] error: statement with no effect [-Werror=unused-value] witg gcc 4.8

Michael Haberler mail17 at mah.priv.at
Sun Apr 20 07:33:10 CEST 2014


commit c11b847 jessie, gcc  4.8.2-16

mah at wheezy:~/src/libwebsockets-warmcat/build$ make
[  2%] Building C object CMakeFiles/websockets.dir/lib/service.c.o
In file included from /home/mah/src/libwebsockets-warmcat/lib/service.c:22:0:
/home/mah/src/libwebsockets-warmcat/lib/service.c: In function ‘lws_handle_POLLOUT_event’:
/home/mah/src/libwebsockets-warmcat/lib/private-libwebsockets.h:463:34: error: statement with no effect [-Werror=unused-value]
#define lws_libev_io(_a, _b, _c) (0)
                                 ^
/home/mah/src/libwebsockets-warmcat/lib/service.c:149:3: note: in expansion of macro ‘lws_libev_io’
  lws_libev_io(context, wsi, LWS_EV_STOP | LWS_EV_WRITE);
  ^

I can get around the error by removing '-Werror' from CMakeLists.txt

not sure how to fix or fix at all - please advise

- Michael


More information about the Libwebsockets mailing list