[master] Removed three direct references to read_info_ptr members

in pngtest.c that were detected by the new PNG_DEPSTRUCT macro.
This commit is contained in:
Glenn Randers-Pehrson 2009-11-08 20:01:55 -06:00
parent 70c873bcac
commit bf2dabe6f1
3 changed files with 27 additions and 24 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.2.41beta15 - November 9, 2009
Libpng 1.2.41beta16 - November 9, 2009
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.
@ -9,36 +9,36 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.2.41beta15.tar.xz (LZMA-compressed, recommended)
libpng-1.2.41beta15.tar.gz
libpng-1.2.41beta15.tar.bz2
libpng-1.2.41beta16.tar.xz (LZMA-compressed, recommended)
libpng-1.2.41beta16.tar.gz
libpng-1.2.41beta16.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
libpng-1.2.41beta15-no-config.tar.xz (LZMA-compressed, recommended)
libpng-1.2.41beta15-no-config.tar.gz
libpng-1.2.41beta15-no-config.tar.bz2
libpng-1.2.41beta16-no-config.tar.xz (LZMA-compressed, recommended)
libpng-1.2.41beta16-no-config.tar.gz
libpng-1.2.41beta16-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lp1241b15.zip
lp1241b15.7z
lp1241b15.tar.bz2
lp1241b16.zip
lp1241b16.7z
lp1241b16.tar.bz2
Project files
libpng-1.2.41beta15-project-netware.zip
libpng-1.2.41beta15-project-wince.zip
libpng-1.2.41beta16-project-netware.zip
libpng-1.2.41beta16-project-wince.zip
Other information:
libpng-1.2.41beta15-README.txt
libpng-1.2.41beta15-KNOWNBUGS.txt
libpng-1.2.41beta15-LICENSE.txt
libpng-1.2.41beta15-Y2K-compliance.txt
libpng-1.2.41beta15-[previous version]-diff.txt
libpng-1.2.41beta16-README.txt
libpng-1.2.41beta16-KNOWNBUGS.txt
libpng-1.2.41beta16-LICENSE.txt
libpng-1.2.41beta16-Y2K-compliance.txt
libpng-1.2.41beta16-[previous version]-diff.txt
Changes since the last public release (1.2.40):
@ -127,7 +127,7 @@ version 1.2.41beta14 [November 8, 2009]
Retained png_calloc() from 1.2.41beta08 but as a non-exported function,
and removed reference to png_calloc from scripts/*.def
version 1.2.41beta15 [November 9, 2009]
version 1.2.41beta15 [November 8, 2009]
Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
PNG_ALLOCATED macros to detect deprecated direct access to the
png_struct or info_struct members and other deprecated usage in
@ -137,10 +137,11 @@ version 1.2.41beta15 [November 9, 2009]
functions while building libpng. They need to be tested, especially
those using compilers other than gcc.
Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
version 1.2.41beta16 [November 9, 2009]
Removed three direct references to read_info_ptr members in pngtest.c
that were detected by the new PNG_DEPSTRUCT macro.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -2558,7 +2558,7 @@ version 1.2.41beta14 [November 8, 2009]
Retained png_calloc() from 1.2.41beta08 but as a non-exported function,
and removed reference to png_calloc from scripts/*.def
version 1.2.41beta15 [November 9, 2009]
version 1.2.41beta15 [November 8, 2009]
Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
PNG_ALLOCATED macros to detect deprecated direct access to the
png_struct or info_struct members and other deprecated usage in
@ -2568,6 +2568,8 @@ version 1.2.41beta15 [November 9, 2009]
functions while building libpng. They need to be tested, especially
those using compilers other than gcc.
Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
version 1.2.41beta16 [November 9, 2009]
Removed three direct references to read_info_ptr members in pngtest.c
that were detected by the new PNG_DEPSTRUCT macro.

View File

@ -1112,11 +1112,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
&trans_values))
{
int sample_max = (1 << read_info_ptr->bit_depth);
int sample_max = (1 << bit_depth);
/* libpng doesn't reject a tRNS chunk with out-of-range samples */
if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
if (!((color_type == PNG_COLOR_TYPE_GRAY &&
(int)trans_values->gray > sample_max) ||
(read_info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
(color_type == PNG_COLOR_TYPE_RGB &&
((int)trans_values->red > sample_max ||
(int)trans_values->green > sample_max ||
(int)trans_values->blue > sample_max))))
@ -1689,4 +1689,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_41beta15 your_png_h_is_not_version_1_2_41beta15;
typedef version_1_2_41beta16 your_png_h_is_not_version_1_2_41beta16;