[GTK] ../../Source/ThirdParty/xdgmime/src/xdgmimecache.c:200:62: warning: pointer...
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Apr 2017 06:26:59 +0000 (06:26 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Apr 2017 06:26:59 +0000 (06:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171026

Reviewed by Carlos Garcia Campos.

* xdgmime/README.webkit:
* xdgmime/src/xdgmimecache.c:
(cache_magic_matchlet_compare_to_data):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/ChangeLog
Source/ThirdParty/xdgmime/README.webkit
Source/ThirdParty/xdgmime/src/xdgmimecache.c

index ee49b412ee2bfbf6324d85828d96ef8745247550..904e0db2f5a10f802b2e094f98b93da15f802b86 100644 (file)
@@ -1,3 +1,14 @@
+2017-04-19  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [GTK] ../../Source/ThirdParty/xdgmime/src/xdgmimecache.c:200:62: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
+        https://bugs.webkit.org/show_bug.cgi?id=171026
+
+        Reviewed by Carlos Garcia Campos.
+
+        * xdgmime/README.webkit:
+        * xdgmime/src/xdgmimecache.c:
+        (cache_magic_matchlet_compare_to_data):
+
 2017-03-24  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix the build after r214338.
index 8b494ed98e6f022b1d6106e2e6a106a5b61e4b1f..c5bee5ca808a8334dca17c8d76f11619742f5117 100644 (file)
@@ -11,6 +11,7 @@ Changes for the WebKit project:
 
  - Add xdg_mime_get_simple_globs
  - s/^#include <config.h>/#include "cmakeconfig.h"/g
+ - Fix invalid pointer arithmetic: https://bugs.webkit.org/show_bug.cgi?id=171026
 
 Changes included from GLib sources:
 
index d78d0223aa54be5dbfc208c69111219125b9dcc6..076d679c3754852012a7cb74b943e80dc21ac8cc 100644 (file)
@@ -197,7 +197,7 @@ cache_magic_matchlet_compare_to_data (XdgMimeCache *cache,
        }
       else
        {
-         valid_matchlet = memcmp(cache->buffer + data_offset, data + i, data_length) == 0;
+         valid_matchlet = memcmp(cache->buffer + data_offset, (unsigned char *)data + i, data_length) == 0;
        }
 
       if (valid_matchlet)