From 13ce05daaf282b75d0e2c8dda435c085c30606b9 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Sat, 3 Oct 2015 11:08:03 -0700 Subject: [PATCH] Fix 'pow' macros in pngvalid.c It is legal for 'pow' to be a macro, therefore the argument list cannot contain preprocessing directives. Make sure pow is a function where this happens (this is a minimal safe fix, the issue only arises in non-performance-critical code.) Signed-off-by: John Bowler --- contrib/libtests/pngvalid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index 36b25551b..7cee971bf 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -7158,7 +7158,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, * conversion adds another +/-2 in the 16-bit case and * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. */ - that->pm->limit += pow( + that->pm->limit += (pow)( # if PNG_MAX_GAMMA_8 < 14 (that->this.bit_depth == 16 ? 8. : 6. + (1<<(15-PNG_MAX_GAMMA_8))) @@ -7182,7 +7182,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, * affects the limit used for checking for internal calculation errors, * not the actual limit imposed by pngvalid on the output errors. */ - that->pm->limit += pow( + that->pm->limit += (pow)( # if DIGITIZE 1.3 # else