X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d10c19d6e00f98e61ae6c4487768227613a05b00..79c78d4284afd3ca726edf16763d248dc6253386:/src/common/imagpng.cpp diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index b2925a2a8c..54c3ac8819 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -175,7 +175,7 @@ void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data, // from pngerror.c // so that the libpng doesn't send anything on stderr void -PNGLINKAGEMODE wx_png_error(png_structp png_ptr, png_const_charp message) +PNGLINKAGEMODE wx_png_error(png_structp WXUNUSED(png_ptr), png_const_charp message) { wxLogFatalError( wxString::FromAscii(message) ); } @@ -529,8 +529,6 @@ wxPNGHandler::LoadFile(wxImage *image, if (!png_ptr) goto error; - png_set_error_fn(png_ptr, (png_voidp)NULL, wx_png_error, wx_png_warning); - // NB: please see the comment near wxPNGInfoStruct declaration for // explanation why this line is mandatory png_set_read_fn( png_ptr, &wxinfo, wx_PNG_stream_reader); @@ -645,8 +643,6 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos return false; } - png_set_error_fn(png_ptr, (png_voidp)NULL, wx_png_error, wx_png_warning); - png_infop info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) {