nginx_tcp_proxy_module icon indicating copy to clipboard operation
nginx_tcp_proxy_module copied to clipboard

ngx_tcp_session.c:218:31: error: variable ‘s’ set but not used

Open nearapogee opened this issue 12 years ago • 5 comments

I attempted to compile the develop branch at 58217c68534. I got an error when running make. I am compiling nginx 1.20. I an not quire sure how to fix this.

sudo ./configure --with-http_ssl_module --add-module=/usr/local/src/nginx_tcp_proxy_module

Error when running make:

        -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_session.o \
        /usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c
/usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c: In function ‘ngx_tcp_ssl_handshake_handler’:
/usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c:218:31: error: variable ‘s’ 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_session.o] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-1.2.0'
make: *** [build] Error 2

nearapogee avatar May 08 '12 19:05 nearapogee

Thanks. Matt. This is an unused variable warning. Just remove this variable is OK.

I'll fix this problem today.

Thanks for your report.

On 2012/5/9 3:57, Matt Smith wrote:

I attempted to compile the develop branch at 58217c68534. I got an error when running make. I am compiling nginx 1.20. I an not quire sure how to fix this.

sudo ./configure --with-http_ssl_module --add-module=/usr/local/src/nginx_tcp_proxy_module

Error when running make:

      -o objs/addon/nginx_tcp_proxy_module/ngx_tcp_session.o \
      /usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c
/usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c: In function ‘ngx_tcp_ssl_handshake_handler’:
/usr/local/src/nginx_tcp_proxy_module/ngx_tcp_session.c:218:31: error: variable ‘s’ 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_session.o] Error 1
make[1]: Leaving directory `/usr/local/src/nginx-1.2.0'
make: *** [build] Error 2

Reply to this email directly or view it on GitHub: https://github.com/yaoweibin/nginx_tcp_proxy_module/issues/33

yaoweibin avatar May 09 '12 01:05 yaoweibin

No problem. I removed the -Werror switch from the make file and this allowed me to go on. I tried commenting out the variable, but it is use in the if clause, so it threw another error.

I need to use the SSL features in the develop branch for my project, if I decide to go this route. Would you say the develop branch is stable enough for production?

When will the new features on develop be merged into master?

nearapogee avatar May 09 '12 02:05 nearapogee

Yes, It should be stable. But I suggest you do enough test. I'm planing to merge this branch. But I'm just too busy this month.

On 2012/5/9 10:12, Matt Smith wrote:

No problem. I removed the -Werror switch from the make file and this allowed me to go on. I tried commenting out the variable, but it is use in the if clause, so it threw another error.

I need to use the SSL features in the develop branch for my project, if I decide to go this route. Would you say the develop branch is stable enough for production?

When will the new features on develop be merged into master?


Reply to this email directly or view it on GitHub: https://github.com/yaoweibin/nginx_tcp_proxy_module/issues/33#issuecomment-5591323

yaoweibin avatar May 09 '12 02:05 yaoweibin

OK, I have remove this variable. Try the latest revision.

Thanks.

On 2012/5/9 10:12, Matt Smith wrote:

No problem. I removed the -Werror switch from the make file and this allowed me to go on. I tried commenting out the variable, but it is use in the if clause, so it threw another error.

I need to use the SSL features in the develop branch for my project, if I decide to go this route. Would you say the develop branch is stable enough for production?

When will the new features on develop be merged into master?


Reply to this email directly or view it on GitHub: https://github.com/yaoweibin/nginx_tcp_proxy_module/issues/33#issuecomment-5591323

yaoweibin avatar May 09 '12 02:05 yaoweibin

Thanks. I'll give it a go. Thanks for the helpful project.

nearapogee avatar May 09 '12 02:05 nearapogee