diff --git a/ANNOUNCE b/ANNOUNCE index a29dd4807..7dd49bff2 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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 diff --git a/CHANGES b/CHANGES index fecc756aa..e6e9f5b17 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/pngwrite.c b/pngwrite.c index cfc5570df..473f5019d 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -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; diff --git a/pngwutil.c b/pngwutil.c index 3bb6cf15c..e2065bf96 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -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