From: Jeff Trawick Date: Tue, 3 Oct 2000 15:05:26 +0000 (+0000) Subject: The previous commit pointed out an unfortunate problem with the X-Git-Tag: APACHE_2_0_ALPHA_7~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07cb4236489389e77e9fedc417f8c8240f56face;p=thirdparty%2Fapache%2Fhttpd.git The previous commit pointed out an unfortunate problem with the ap_os_case_canonical_filename() interface: It returns const char * on platforms where no mapping is ever performed but char * on platforms where mapping can occur. Such a discrepancy seems to be a good choice, as no platform is penalized with extra pathlength. This tweak gets rid of a const misuse warning on systems where ap_os_case_canonical_filename() returns const char *. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86376 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c index 469d07f183e..13a59bcd153 100644 --- a/modules/cache/mod_file_cache.c +++ b/modules/cache/mod_file_cache.c @@ -137,7 +137,7 @@ typedef struct { #if APR_HAS_SENDFILE apr_file_t *file; #endif - char *filename; + const char *filename; apr_finfo_t finfo; int is_mmapped; #if APR_HAS_MMAP @@ -273,7 +273,7 @@ static const char *mmapfile(cmd_parms *cmd, void *dummy, const char *filename) a_file *new_file; a_file tmp; apr_file_t *fd = NULL; - char *fspec; + const char *fspec; fspec = ap_os_case_canonical_filename(cmd->pool, filename); if (apr_stat(&tmp.finfo, fspec, cmd->temp_pool) != APR_SUCCESS) {