shithub: freetype+ttf2subf

Download patch

ref: cadd29de08abd1bba38d42a76efdb4971d45d01e
parent: c9d7c03fa1b5c6244759ade814c546da04080646
author: Werner Lemberg <[email protected]>
date: Wed Aug 16 09:32:17 EDT 2017

* src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-16  Werner Lemberg  <[email protected]>
+
+	* src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.
+
 2017-08-15  Behdad Esfahbod  <[email protected]>
 
 	[sfnt] Speed up PNG image loading.
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -57,8 +57,6 @@
   {
     unsigned int  i = 0, limit;
 
-    FT_UNUSED( png );
-
     /* the `vector_size' attribute was introduced in gcc 3.1, which */
     /* predates clang; the `__BYTE_ORDER__' preprocessor symbol was */
     /* introduced in gcc 4.6 and clang 3.2, respectively            */
@@ -78,7 +76,7 @@
     limit = row_info->rowbytes - 16 + 1;
     for ( ; i < limit; i += 16 )
     {
-      char*  base = &data[i];
+      unsigned char*  base = &data[i];
 
       v82  s, s0, s1, a;
       v82  ma = { 1, 1, 3, 3, 5, 5, 7, 7 };
@@ -105,6 +103,8 @@
       memcpy( base, &s, 16 );
     }
 #endif /* use `vector_size' */
+
+    FT_UNUSED( png );
 
     limit = row_info->rowbytes;
     for ( ; i < limit; i += 4 )