gnosek/nginx-upstream-fair — Issue #3: Fails to build on Ubuntu 11.10 gcc 4.6
Author: pkwarren
Created: 2011-12-06 20:45:20+00:00
State: open

I am getting a build failure attempting to build the module on Ubuntu 11.10 (gcc 4.6).

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 objs -I src/http -I src/http/modules -I src/mail
-o objs/addon/nginx-upstream-fair-7171df84c5/ngx_http_upstream_fair_module.o

These are the build errors I'm getting:

ngx_http_upstream_fair_module.c: In function ‘ngx_http_upstream_fair_update_nreq’:
ngx_http_upstream_fair_module.c:649:16: error: variable ‘total_nreq’ set but not used [-Werror=unused-but-set-variable]
ngx_http_upstream_fair_module.c:648:16: error: variable ‘nreq’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

It only appears to occur if '--enable-debug' is not passed as a command-line option when building nginx.