Bug 40478

Summary: Can't compile pngwriter with libpng 1.5
Product: poppler Reporter: Maarten Bosmans <mkbosmans>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix compile error

Description Maarten Bosmans 2011-08-30 00:21:00 UTC
This is the error I get:

  CXX    PNGWriter.lo
PNGWriter.cc: In member function 'virtual bool PNGWriter::init(FILE*, int, int, int, int)':
PNGWriter.cc:115:102: error: invalid conversion from 'char*' to 'png_const_bytep {aka const unsigned char*}' [-fpermissive]
/usr/i686-w64-mingw32/sys-root/mingw/include/libpng15/png.h:2189:1: error:   initializing argument 5 of 'void png_set_iCCP(png_structp, png_infop, png_const_charp, int, png_const_bytep, png_uint_32)' [-fpermissive]

(Note that this is with libpng 1.5 and mingw cross-compiling)
Comment 1 Adrian Johnson 2011-08-30 02:41:41 UTC
Created attachment 50677 [details] [review]
Fix compile error

libpng changed the type of one of the arguments in png_set_iCCP() in 1.5.0.
Comment 2 Maarten Bosmans 2011-08-30 04:06:34 UTC
Review of attachment 50677 [details] [review]:

Yup, this fixes it
Comment 3 Albert Astals Cid 2011-08-30 09:57:32 UTC
Commited

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.