You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2017/08/19 09:05:55 UTC

svn commit: r1805493 - /httpd/httpd/trunk/modules/metadata/mod_mime_magic.c

Author: jailletc36
Date: Sat Aug 19 09:05:55 2017
New Revision: 1805493

URL: http://svn.apache.org/viewvc?rev=1805493&view=rev
Log:
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=]

Modified:
    httpd/httpd/trunk/modules/metadata/mod_mime_magic.c

Modified: httpd/httpd/trunk/modules/metadata/mod_mime_magic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_mime_magic.c?rev=1805493&r1=1805492&r2=1805493&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_mime_magic.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_mime_magic.c Sat Aug 19 09:05:55 2017
@@ -1007,10 +1007,10 @@ static int apprentice(server_rec *s, apr
             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, unsigne
             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
                     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;
                 }