From 450f7fae48c67ce6fdb91f7d9d02eba2ed60d4fb Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sat, 19 Aug 2017 09:05:55 +0000 Subject: [PATCH] Fix remaning compilation warning when MIME_MAGIC_DEBUG is defined. Style is not perfect, but at least, the warning is fixed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- modules/metadata/mod_mime_magic.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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; } -- 2.47.3