From 74a9b670e9020b1fdd01102dcccd4d6891f2e536 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 2 Aug 2013 14:53:32 +0200 Subject: [PATCH] [sfnt] Fix compilation with g++. * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use cast. (Load_SBit_Png): Pacify compiler. --- ChangeLog | 8 ++++++++ src/sfnt/pngshim.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4029fb217..28008f125 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-08-02 Werner Lemberg + + [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 Werner Lemberg diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c index 9edf99332..878de1fef 100644 --- 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 ||