On Fri, Jul 14, 2006 at 03:35:53PM +0100, Nick Kew wrote: > On Friday 14 July 2006 14:16, Joe Orton wrote: > > > This introduced compiler warnings: > > > > cc1: warnings being treated as errors > > mod_proxy.c: In function `proxy_interpolate': > > mod_proxy.c:427: warning: passing arg 1 of `ap_strstr' discards qualifiers > > from pointer target type mod_proxy.c:431: warning: passing arg 1 of > > `ap_strchr' discards qualifiers from pointer target type make[4]: *** > > [mod_proxy.slo] Error 1 > > Ugh. > > It's being used in those lines with "const char*" arguments. > That's what the <string.h> strstr and strchr take. Depending > on the AP_DEBUG setting, ap_strstr may be #defined to strstr > and ap_strchr to strchr.
Sorry, I always assume everyone knows about the magic strchr tricks, should have mentioned this. This is a type-safety feature which catches places where traditional strchr() throws away const qualifiers - use ap_strchr_c() if passing in a const string.
