[devel] Enabled compilation with g++ compiler. This compiler does not

recognize the file extension, so it always compiles with C++ rules.  Made minor
changes to pngrutil.c to cast results where C++ expects it but C does not.
This commit is contained in:
John Bowler
2011-07-14 23:02:11 -05:00
committed by Glenn Randers-Pehrson
parent 0a007b743e
commit a5bcab7854
4 changed files with 57 additions and 32 deletions

View File

@@ -458,7 +458,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
{
/* Success (maybe) - really uncompress the chunk. */
png_size_t new_size = 0;
png_charp text = png_malloc_warn(png_ptr,
png_charp text = (png_charp)png_malloc_warn(png_ptr,
prefix_size + expanded_size + 1);
if (text != NULL)
@@ -501,7 +501,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
* amount of compressed data.
*/
{
png_charp text = png_malloc_warn(png_ptr, prefix_size + 1);
png_charp text = (png_charp)png_malloc_warn(png_ptr, prefix_size + 1);
if (text != NULL)
{