yaoweibin / nginx_tcp_proxy_module

add the feature of tcp proxy with nginx, with health check and status monitor
http://yaoweibin.github.com/nginx_tcp_proxy_module
1.65k stars 365 forks source link

Error on build #8

Closed bpierre closed 13 years ago

bpierre commented 13 years ago
gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
    -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream.o \
    ../nginx_tcp_proxy_module/ngx_tcp_upstream.c
../nginx_tcp_proxy_module/ngx_tcp_upstream.c: In function ‘ngx_tcp_upstream_next’:
../nginx_tcp_proxy_module/ngx_tcp_upstream.c:464:17: error: variable ‘state’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream.o] Error 1
make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
make: *** [build] Error 2
bpierre commented 13 years ago

I tried with 0.8.54 and 1.0.4, same result.

GCC 4.6.1 on Arch Linux

yaoweibin commented 13 years ago

On 2011-7-14 0:04, bpierre wrote:

../nginx_tcp_proxy_module/ngx_tcp_upstream.c: In function ‘ngx_tcp_upstream_next’: ../nginx_tcp_proxy_module/ngx_tcp_upstream.c:464:17: error: variable ‘state’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors

 make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream.o] Error 1
 make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
 make: *** [build] Error 2

OK, I have fixed it.

What's your GCC version? I didn't see the option of " unused-but-set-variable " from the GCC manual in my box.

Thanks.

Weibin Yao

bpierre commented 13 years ago

Thanks!

My GCC version is 4.6.1, as said in my previous comment.

bpierre commented 13 years ago

Ok, now I got this:

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
    -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o \
    ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_clean_event’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:444:34: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_finish_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:526:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_timeout_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:567:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_peek_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:592:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_field’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:26: error: variable ‘str_value’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:15: error: variable ‘str_field’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_version’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:643:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘status_code’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:656:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reason_phrase’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:692:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘domain’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:885:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘greeting_text’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:898:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_code’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:912:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_text’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:949:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_send_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1287:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1283:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_recv_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1368:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_upstream_check_status_set_status’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1856:46: error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o] Error 1
make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
make: *** [build] Error 2
yaoweibin commented 13 years ago

On 2011-7-14 20:38, bpierre wrote:

Ok, now I got:

 gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
  -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o \
  ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_clean_event’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:444:34: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_finish_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:526:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_timeout_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:567:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_peek_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:592:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_field’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:26: error: variable ‘str_value’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:15: error: variable ‘str_field’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_version’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:643:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘status_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:656:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reason_phrase’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:692:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘domain’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:885:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘greeting_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:898:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:912:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:949:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_send_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1287:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1283:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_recv_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1368:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_upstream_check_status_set_status’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1856:46: error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
 cc1: all warnings being treated as errors

 make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o] Error 1
 make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
 make: *** [build] Error 2

Fine, I will use GCC 4.6.1 to fix these problems tomorrow.

Thanks.

Weibin Yao

yaoweibin commented 13 years ago

On 2011-7-14 20:38, bpierre wrote:

Ok, now I got:

 gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
  -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o \
  ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_clean_event’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:444:34: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_finish_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:526:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_timeout_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:567:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_peek_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:592:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_field’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:26: error: variable ‘str_value’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:628:15: error: variable ‘str_field’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_version’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:643:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘status_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:656:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reason_phrase’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:692:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘domain’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:885:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘greeting_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:898:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:912:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:949:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_send_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1287:36: error: variable ‘uscf’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1283:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_recv_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1368:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_upstream_check_status_set_status’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1856:46: error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
 cc1: all warnings being treated as errors

 make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o] Error 1
 make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
 make: *** [build] Error 2

OK, I have fixed your problem. Try the latest revision in the master branch. Thanks for your report.

Weibin Yao

bpierre commented 13 years ago

Thanks for the updates!

I still got some errors (sorry :D)

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
    -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o \
    ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_field’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:615:26: error: variable ‘str_value’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:615:15: error: variable ‘str_field’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_version’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:630:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘status_code’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:643:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reason_phrase’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:679:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘domain’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:872:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘greeting_text’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:885:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_code’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:899:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_text’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:936:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_send_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1270:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_recv_handler’:
../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1353:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o] Error 1
make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
make: *** [build] Error 2
yaoweibin commented 13 years ago

On 2011-7-15 18:11, bpierre wrote:

Thanks for the updates!

I still got some errors (sorry :D)

 gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx_tcp_proxy_module/modules -I ../nginx_tcp_proxy_module -I objs -I src/http -I src/http/modules -I src/mail \
  -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o \
  ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_field’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:615:26: error: variable ‘str_value’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:615:15: error: variable ‘str_field’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘http_version’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:630:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘status_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:643:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reason_phrase’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:679:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘domain’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:872:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘greeting_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:885:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_code’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:899:32: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘reply_text’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:936:15: error: variable ‘str’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_send_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1270:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c: In function ‘ngx_tcp_check_recv_handler’:
 ../nginx_tcp_proxy_module/ngx_tcp_upstream_check.c:1353:36: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
 cc1: all warnings being treated as errors

 make[1]: *** [objs/addon/nginx_tcp_proxy_module/ngx_tcp_upstream_check.o] Error 1
 make[1]: Leaving directory `/home/pierre/builds/nginx-1.0.4'
 make: *** [build] Error 2

OK, Now I should fix your problem. Try the latest revision. No warning should be in Nginx:-) .

I didn't find these warning because I used with the option of --with-debug:-( .

Weibin Yao

bpierre commented 13 years ago

Perfect! Thank you for your time, and I’m glad to have helped a little to improve this module :-)