shithub: freetype+ttf2subf

Download patch

ref: 74a9b670e9020b1fdd01102dcccd4d6891f2e536
parent: 89a529f3176fc68415cc5e3ab50f89629fb269cd
author: Werner Lemberg <[email protected]>
date: Fri Aug 2 10:53:32 EDT 2013

[sfnt] Fix compilation with g++.

* src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
cast.
(Load_SBit_Png): Pacify compiler.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-08-02  Werner Lemberg  <[email protected]>
+
+	[sfnt] Fix compilation with g++.
+
+	* src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
+	cast.
+	(Load_SBit_Png): Pacify compiler.
+
 2013-08-02  suzuki toshiya  <[email protected]>
             Werner Lemberg  <[email protected]>
 
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -122,7 +122,7 @@
   error_callback( png_structp      png,
                   png_const_charp  error_msg )
   {
-    FT_Error*  error = png_get_error_ptr( png );
+    FT_Error*  error = (FT_Error*)png_get_error_ptr( png );
 
     FT_UNUSED( error_msg );
 
@@ -159,7 +159,7 @@
 
     if ( FT_FRAME_ENTER( length ) )
     {
-      FT_Error*  e = png_get_error_ptr( png );
+      FT_Error*  e = (FT_Error*)png_get_error_ptr( png );
 
 
       *e = FT_THROW( Invalid_Stream_Read );
@@ -195,7 +195,7 @@
 
     int         bitdepth, color_type, interlace;
     FT_Int      i;
-    png_byte*  *rows;
+    png_byte*  *rows = NULL; /* pacify compiler */
 
 
     if ( x_offset < 0 ||