mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
committed by
Glenn Randers-Pehrson
parent
0a007b743e
commit
a5bcab7854
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user