On 15.10.2010 18:12, Igor Galić wrote:
----- "Rainer Jung"<rainer.j...@kippdata.de> wrote:
The culprit was the usual, we do use APLOG_MARK in other places than
just ap_log* and since the macro changed its meaning the code broke.
That's expected and well-documented after adding the per-module log
config to 2.3.
I remembered that it was documented and was looking for documentation
but failed to find it.
http://httpd.apache.org/docs/trunk/developer/new_api_2_4.html
I'm getting:
/opt/bw/build/libtool --silent --mode=compile /opt/bw/bin/clang
-I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -fPIC -march=core2
-msse4.1 -D_FORTIFY_SOURCE=2 -g -Wall -Wm
issing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread
-DHAVE_APR -I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -DAP_
DEBUG -I /include -I /include/ -c jk_map.c -o jk_map.lo
jk_map.c:637:24: warning: comparison of unsigned expression>= 0 is always true
[-Wtautological-compare]
for (i = i - 1; (i>= 0)&&
~ ^ ~
1 warning generated.
Fixed in r1023020. Shouldn't impose a real problem, because those tokens
are not expected to be empty. But better safe than sorry.
And, this, which can be ignored, I suppose:
/opt/bw/build/libtool --silent --mode=compile /opt/bw/bin/clang
-I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -DUSE_APACHE_MD5 -I
../common -I /include -I /include/unix -
DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -DAP_DEBUG -fPIC -march=core2 -msse4.1
-D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-prototypes -Wstrict-prototypes
-Wmissing-declarations -pthread
-DHAVE_APR -I/opt/bw/include -fPIC -msse4.1 -D_FORTIFY_SOURCE=2 -g -Wall
-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -pthread
-DLINUX=2 -D_REENTRANT -D_GNU_
SOURCE -DAP_DEBUG -c mod_jk.c -o mod_jk.lo
mod_jk.c:647:5: warning: initializing 'server_rec *' (aka 'struct server_rec
*') with an expression of type 'const server_rec *' (aka 'const struct
server_rec *') discards
qualifiers
That one looks like a minor bug in the ap_log_error macro of httpd,
which I will bring up separately.
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
^
/opt/bw/include/http_log.h:340:22: note: instantiated from:
do { server_rec *sr = s; if (APLOG_MODULE_IS_LEVEL(sr, mi, level)) \
^
mod_jk.c:647:5: warning: format string is not a string literal (potentially
insecure) [-Wformat-security]
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
^
mod_jk.c:647:5: note: instantiated from:
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
^ ~~~
mod_jk.c:647:63: note: instantiated from:
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
^~~
mod_jk.c:653:9: warning: format string is not a string literal (potentially
insecure) [-Wformat-security]
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, res);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from mod_jk.c:40:
/opt/bw/include/http_log.h:337:27: note: instantiated from:
#define ap_log_error(...) ap_log_error__(__VA_ARGS__)
^
mod_jk.c:653:9: note: instantiated from:
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, res);
^ ~~~
mod_jk.c:653:70: note: instantiated from:
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, res);
The format warnings are OK, because
- we don't use the function with any user provided data
- we remove all occurances of "%" from res before passing along the
ap_log_error
Thanks for checking!
Regards,
Rainer