summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-03-01 15:37:30 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-03-01 15:37:30 -0600
commitd0023a739152ac4a857a5372f9530c3988be133a (patch)
treede89353fa1877dc62d50e1d23a782bef549b9b9a
parent11fc1f0f26c270e0d214d64c83ebb76f0f6bbf81 (diff)
downloadlibpng-d0023a739152ac4a857a5372f9530c3988be133a.tar.gz
[libpng15] Suppress clang warnings about implicit sign changes in png.c
-rw-r--r--ANNOUNCE5
-rw-r--r--CHANGES3
-rw-r--r--png.c10
3 files changed, 10 insertions, 8 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index e8590db73..eee9ad91d 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.5.29beta01 - December 30, 2016
+Libpng 1.5.29beta01 - March 1, 2017
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.
@@ -26,7 +26,8 @@ Other information:
Changes since the last public release (1.5.28):
-version 1.5.29beta01 [December 30, 2016]
+version 1.5.29beta01 [March 1, 2017]
+ Suppress clang warnings about implicit sign changes in png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 59ace62b4..ca78c608a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4531,7 +4531,8 @@ version 1.5.28 [December 29, 2016]
Fixed a potential null pointer dereference in png_set_text_2() (bug report
and patch by Patrick Keshishian, CVE-2016-10087).
-version 1.5.29beta01 [December 30, 2016]
+version 1.5.29beta01 [March 1, 2017]
+ Suppress clang warnings about implicit sign changes in png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/png.c b/png.c
index 460bfe9e5..a9e75cca9 100644
--- a/png.c
+++ b/png.c
@@ -656,14 +656,14 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.5.29beta01 - December 30, 2016" PNG_STRING_NEWLINE \
+ "libpng version 1.5.29beta01 - March 1, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.5.29beta01 - December 30, 2016\
+ return "libpng version 1.5.29beta01 - March 1, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2926,13 +2926,13 @@ png_set_option(png_structp png_ptr, int option, int onoff)
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
(option & 1) == 0)
{
- int mask = 3 << option;
- int setting = (2 + (onoff != 0)) << option;
+ int mask = 3U << option;
+ int setting = (2U + (onoff != 0)) << option;
int current = png_ptr->options;
png_ptr->options = (png_byte)((current & ~mask) | setting);
- return (current & mask) >> option;
+ return (int)(current & mask) >> option;
}
return PNG_OPTION_INVALID;