From: Christophe Jaillet Date: Sat, 19 Aug 2017 09:05:55 +0000 (+0000) Subject: Fix remaning compilation warning when MIME_MAGIC_DEBUG is defined. X-Git-Tag: 2.5.0-alpha~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=450f7fae48c67ce6fdb91f7d9d02eba2ed60d4fb;p=thirdparty%2Fapache%2Fhttpd.git Fix remaning compilation warning when MIME_MAGIC_DEBUG is defined. Style is not perfect, but at least, the warning is fixed. warning: format ‘%c’ expects argument of type ‘int’, but argument 10 has type ‘long unsigned int’ [-Wformat=] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805493 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index af119f11df2..d144621db16 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -1007,10 +1007,10 @@ static int apprentice(server_rec *s, apr_pool_t *p) ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01519) MODNAME ": apprentice: POINTER CLOBBERED! " "m=\"%c%c%c%c\" line=%d", - (((unsigned long) m) >> 24) & 255, - (((unsigned long) m) >> 16) & 255, - (((unsigned long) m) >> 8) & 255, - ((unsigned long) m) & 255, + (char)((((unsigned long) m) >> 24) & 255), + (char)((((unsigned long) m) >> 16) & 255), + (char)((((unsigned long) m) >> 8 ) & 255), + (char)(( (unsigned long) m ) & 255), prevm ? prevm->lineno : -1); break; } @@ -1558,10 +1558,10 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes) ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01530) MODNAME ": match: POINTER CLOBBERED! " "m=\"%c%c%c%c\"", - (((unsigned long) m) >> 24) & 255, - (((unsigned long) m) >> 16) & 255, - (((unsigned long) m) >> 8) & 255, - ((unsigned long) m) & 255); + (char)((((unsigned long) m) >> 24) & 255), + (char)((((unsigned long) m) >> 16) & 255), + (char)((((unsigned long) m) >> 8 ) & 255), + (char)(( (unsigned long) m ) & 255)); break; } } @@ -2389,10 +2389,10 @@ static int magic_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01559) MODNAME ": magic_init 1: POINTER CLOBBERED! " "m=\"%c%c%c%c\" line=%d", - (((unsigned long) m) >> 24) & 255, - (((unsigned long) m) >> 16) & 255, - (((unsigned long) m) >> 8) & 255, - ((unsigned long) m) & 255, + (char)((((unsigned long) m) >> 24) & 255), + (char)((((unsigned long) m) >> 16) & 255), + (char)((((unsigned long) m) >> 8 ) & 255), + (char)(( (unsigned long) m ) & 255), prevm ? prevm->lineno : -1); break; }