[libpng16] Fix g++ build breaks

This commit is contained in:
John Bowler 2015-06-03 15:04:03 -05:00 committed by Glenn Randers-Pehrson
parent 2dfcf65981
commit 7023d871e8
4 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,7 @@ Version 1.6.18beta07 [June 3, 2015]
variables in the Try macro needs to be volatile to prevent value
being lost over the setjmp (John Bowler).
Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler).
Fix g++ build breaks (John Bowler).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5264,6 +5264,7 @@ Version 1.6.18beta07 [June 3, 2015]
variables in the Try macro needs to be volatile to prevent value
being lost over the setjmp (John Bowler).
Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler).
Fix g++ build breaks (John Bowler).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1093,12 +1093,14 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
png_ptr->width) + 1;
if (png_ptr->try_row == NULL)
png_ptr->try_row = png_malloc(png_ptr, buf_size);
png_ptr->try_row = png_voidcast(png_bytep,
png_malloc(png_ptr, buf_size));
if (num_filters > 1)
{
if (png_ptr->tst_row == NULL)
png_ptr->tst_row = png_malloc(png_ptr, buf_size);
png_ptr->tst_row = png_voidcast(png_bytep,
png_malloc(png_ptr, buf_size));
}
}
png_ptr->do_filter = (png_byte)filters;

View File

@ -2021,7 +2021,8 @@ png_write_start_row(png_structrp png_ptr)
* filters.
*/
if ((filters & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) != 0)
png_ptr->prev_row = png_calloc(png_ptr, buf_size);
png_ptr->prev_row = png_voidcast(png_bytep,
png_calloc(png_ptr, buf_size));
#endif /* WRITE_FILTER */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED