omniti-labs/reconnoiter — Issue #36: error: variable ‘cn_expected’,'feedtype' set but not used [-Werror=unused-but-set-variable]
Author: kirantpatil
Created: 2011-12-15 02:16:12+00:00
State: open

system info:
—————–
[akshatha@localhost src]$ uname -a
Linux localhost.localdomain 2.6.41.4-1.fc15.x86_64 #1 SMP Tue Nov 29 11:53:48 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[akshatha@localhost src]$ cat /etc/issue
Fedora release 15 (Lovelock)

I am getting below warnings which acts as errors:
———————————————————————–
[akshatha@localhost reconnoiter]$ make
(cd src && make)
make[1]: Entering directory `/home/akshatha/Documents/reconnoiter/src’
Building version info from git
* version -> 1f06389c4f1d40aaeb808213c44b6beb2d8512af
* symbolic -> branches/master
* version unchanged
make[2]: Entering directory `/home/akshatha/Documents/reconnoiter/src/udns’
…..
…..
- compiling stratcon_realtime_http.c
stratcon_jlog_streamer.c: In function ‘noit_connection_schedule_reattempt’:
stratcon_jlog_streamer.c:244:30: error: variable ‘cn_expected’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c:244:19: error: variable ‘feedtype’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c: In function ‘stratcon_jlog_recv_handler’:
stratcon_jlog_streamer.c:395:29: error: variable ‘feedtype’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c:395:15: error: variable ‘cn_expected’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c: In function ‘noit_connection_ssl_upgrade’:
stratcon_jlog_streamer.c:560:44: error: variable ‘feedtype’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c: In function ‘noit_connection_complete_connect’:
stratcon_jlog_streamer.c:612:70: error: variable ‘feedtype’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c:612:56: error: variable ‘cn_expected’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c: In function ‘noit_connection_initiate_connection’:
stratcon_jlog_streamer.c:690:29: error: variable ‘feedtype’ set but not used [-Werror=unused-but-set-variable]
stratcon_jlog_streamer.c:690:15: error: variable ‘cn_expected’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[1]: *** [stratcon_jlog_streamer.o] Error 1
make[1]: Leaving directory `/home/akshatha/Documents/reconnoiter/src’
make: *** [all] Error 2

However if I remove all those warning lines, it compiles successfully.

Is it recommanded to remove the warning lines? since google shows that most of the solutions have ended in removing lines which contain warning.

Thanks,
Kiran Patil.