From d84fd77bf827a542e30384d18123cd43d8f3c799 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 30 Sep 2016 14:22:57 -0500 Subject: [PATCH] [libpng16] Quieted a warning from clang-3.8 in pngtrans.c. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngtrans.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 66d4b81c2..ea4ec2d1f 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.26beta02 - September 26, 2016 +Libpng 1.6.26beta02 - September 30, 2016 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -41,8 +41,9 @@ Version 1.6.26beta01 [September 26, 2016] Add tests/badcrc.png and tests/badadler.png to tests/pngtest. Merged pngtest.c with libpng-1.7.0beta84/pngtest.c -Version 1.6.26beta02 [September 26, 2016] +Version 1.6.26beta02 [September 30, 2016] Updated the documentation about CRC and ADLER32 handling. + Quieted a warning from clang-3.8 in pngtrans.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 7b77edcd0..cd7436c8b 100644 --- a/CHANGES +++ b/CHANGES @@ -5719,8 +5719,9 @@ Version 1.6.26beta01 [September 26, 2016] Add tests/badcrc.png and tests/badadler.png to tests/pngtest. Merged pngtest.c with libpng-1.7.0beta84/pngtest.c -Version 1.6.26beta02 [September 26, 2016] +Version 1.6.26beta02 [September 30, 2016] Updated the documentation about CRC and ADLER32 handling. + Quieted a warning from clang-3.8 in pngtrans.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngtrans.c b/pngtrans.c index e5cbd79b9..880c88892 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.6.24 [August 4, 2016] + * Last changed in libpng 1.6.26 [(PENDING RELEASE)] * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -693,7 +693,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info) * and this calculation is used because it avoids warnings that other * forms produced on either GCC or MSVC. */ - int padding = (-row_info->pixel_depth * row_info->width) & 7; + int padding = ((256 - row_info->pixel_depth) * (row_info->width & 7)) & 7; png_bytep rp = png_ptr->row_buf + row_info->rowbytes; switch (row_info->bit_depth)