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

Open
nearapogee opened this Issue May 8, 2012 · 5 comments

Projects

None yet

2 participants

@nearapogee
Contributor

I attempted to compile the develop branch at 58217c6. 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
@yaoweibin
Owner

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 58217c6. 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:
#33

@nearapogee
Contributor

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?

@yaoweibin
Owner

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:
#33 (comment)

@yaoweibin
Owner

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:
#33 (comment)

@nearapogee
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment