[master] Relocated "int k" declaration in pngtest.c

to work around a compiler optimization bug.
This commit is contained in:
Glenn Randers-Pehrson
2010-01-26 06:51:00 -06:00
parent 1a86bd2a09
commit 526f839764
2 changed files with 8 additions and 4 deletions

View File

@@ -2484,6 +2484,10 @@ version 1.4.1beta04 [January 23, 2010]
decoding large chunks.
Added png_set|get_chunk_malloc_max() functions.
version 1.4.1beta05 [January 23, 2010]
Relocated "int k" declaration in pngtest.c to avoid compiler optimization
bug.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

View File

@@ -1465,14 +1465,14 @@ main(int argc, char *argv[])
#endif
for (i=2; i<argc; ++i)
{
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
int k;
#endif
int kerror;
fprintf(STDERR, "\n Testing %s:", argv[i]);
kerror = test_one_file(argv[i], outname);
if (kerror == 0)
{
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
int k;
#endif
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long)zero_samples);
@@ -1627,4 +1627,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_1beta04 your_png_h_is_not_version_1_4_1beta04;
typedef version_1_4_1beta05 your_png_h_is_not_version_1_4_1beta05;