[libpng16] Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default

options declares 'index' as a global, causing a warning if it is used as a
local variable.  GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit)
to an (int) (signed 32-bit).  MSVC, however, warns about using the
unary '-' operator on an unsigned value (even though it is well defined
by ANSI-C to be ~x+1).  The padding calculation was changed to use a
different method.  Removed the tests on png_ptr->pass.
This commit is contained in:
John Bowler
2012-03-03 20:49:03 -06:00
committed by Glenn Randers-Pehrson
parent 434801a39c
commit 29a6ba01a7
3 changed files with 47 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.6.0beta16 - March 3, 2012
Libpng 1.6.0beta16 - March 4, 2012
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.
@@ -258,9 +258,16 @@ Version 1.6.0beta15 [March 2, 2012]
without the necessary color data.
Removed whitespace from the end of lines in all source files and scripts.
Version 1.6.0beta16 [March 3, 2012]
Version 1.6.0beta16 [March 4, 2012]
Relocated palette-index checking function from pngrutil.c to pngtrans.c
Added palette-index checking while writing.
Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default options
declares 'index' as a global, causing a warning if it is used as a local
variable. GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit)
to an (int) (signed 32-bit). MSVC, however, warns about using the
unary '-' operator on an unsigned value (even though it is well defined
by ANSI-C to be ~x+1). The padding calculation was changed to use a
different method. Removed the tests on png_ptr->pass.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit