Re: svn commit: r1398983 - in /subversion/trunk: ./ subversion/include/ subversion/libsvn_ra_serf/ subversion/mod_dav_svn/
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 18 Oct 2012 21:17:09 +0100 (BST)
> Author: cmpilato
> URL: http://svn.apache.org/viewvc?rev=1398983&view=rev
> Modified: subversion/trunk/subversion/mod_dav_svn/deadprops.c
deadprops.c:134:26: cast discards '__attribute__((const))' qualifier from pointer target type
Why cast away 'const'?† Standard strrchr() accepts const.
Ugh... What's happening is 'httpd.h' is messing with the standard lib functions:
I'm doing an AP_DEBUG build.† If I remove the explicit cast, I see a different warning:
deadprops.c:134:7: warning: passing argument 1 of 'ap_strrchr' discards 'const' qualifier from pointer target type
So neither way works cleanly for me.
But that's an artifact of a badly designed HTTPD header -- it has no business forcing third-party users of HTTPD code to follow their chosen rules for stdlib functions.
We shouldn't have the explicit cast.
This is an archived mail posted to the Subversion Dev mailing list.