nginx-clojure/nginx-clojure — pull request #60 by tmatilai (2014-12-18 14:07:46+00:00)
Title: Fix compiler errors on 0.3.0

Compiling nginx 1.6.2 with nginx-clojure 0.3.0 on Ubuntu 14.04 with gcc 4.8.2, I get the following errors:

```
[...]
cc -c -I "/usr/lib/jvm/java-7-openjdk-amd64/include" -I "/usr/lib/jvm/java-7-openjdk-amd64/include/linux" -DNGX_CLOJURE_BE_SILENT_WITHOUT_JVM -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -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/c/ngx_http_clojure_module.o \
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c: In function 'ngx_http_clojure_merge_loc_conf':
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:693:33: error: operation on 'mcf->enable_header_filter' may be undefined [-Werror=sequence-point]
= mcf->enable_header_filter = mcf->enable_header_filter
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:696:34: error: operation on 'conf->enable_header_filter' may be undefined [-Werror=sequence-point]
= conf->enable_header_filter = conf->enable_header_filter
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:662:78: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (!conf->handler ## _type.len && conf->enable_ ## handler && # handler != "content_handler") { \
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:704:2: note: in expansion of macro 'ngx_http_clojure_merge_handler'
ngx_http_clojure_merge_handler(conf, prev, content_handler);
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:662:78: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (!conf->handler ## _type.len && conf->enable_ ## handler && # handler != "content_handler") { \
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:705:2: note: in expansion of macro 'ngx_http_clojure_merge_handler'
ngx_http_clojure_merge_handler(conf, prev, rewrite_handler);
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:662:78: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (!conf->handler ## _type.len && conf->enable_ ## handler && # handler != "content_handler") { \
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:706:2: note: in expansion of macro 'ngx_http_clojure_merge_handler'
ngx_http_clojure_merge_handler(conf, prev, access_handler);
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:662:78: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (!conf->handler ## _type.len && conf->enable_ ## handler && # handler != "content_handler") { \
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:707:2: note: in expansion of macro 'ngx_http_clojure_merge_handler'
ngx_http_clojure_merge_handler(conf, prev, header_filter);
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:662:78: error: comparison with string literal results in unspecified behavior [-Werror=address]
if (!conf->handler ## _type.len && conf->enable_ ## handler && # handler != "content_handler") { \
^
../nginx-clojure-0.3.0/src/c/ngx_http_clojure_module.c:709:2: note: in expansion of macro 'ngx_http_clojure_merge_handler'
ngx_http_clojure_merge_handler(conf, prev, body_filter);
^
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/c/ngx_http_clojure_module.o] Error 1
make[1]: Leaving directory `/nginx/nginx-1.6.2'
make: *** [build] Error 2
```

This PR attempts to fix those. But unfortunately I don't understand the internals enough, so please take a closer look. =)