From a69064328bc99f06a1066bec117786d05fa20415 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 27 Jan 2010 07:05:02 -0600 Subject: [PATCH] [master] Undo recent pngtest changes The problem was with a buggy compiler (gcc-4.0.1) not a libpng problem and not worth attempting to work around. --- pngtest.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/pngtest.c b/pngtest.c index 6e1a5bce4..b8896e676 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1481,15 +1481,9 @@ main(int argc, char *argv[]) #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED for (k = 0; k<256; k++) - { - int int_k=(int)k; - int int_used=(int)filters_used[int_k]; - if (int_used) - { - fprintf(STDERR, " Filter %d", int_k); - fprintf(STDERR, " was used %d times\n", int_used); - } - } + if (filters_used[k]) + fprintf(STDERR, " Filter %d was used %lu times\n", + k, (unsigned long)filters_used[k]); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED if (tIME_chunk_present != 0) @@ -1562,15 +1556,9 @@ main(int argc, char *argv[]) #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED for (k = 0; k<256; k++) - { - int int_k=(int)k; - int int_used=(int)filters_used[int_k]; - if (int_used) - { - fprintf(STDERR, " Filter %d", int_k); - fprintf(STDERR, " was used %d times\n", int_used); - } - } + if (filters_used[k]) + fprintf(STDERR, " Filter %d was used %lu times\n", + k, (unsigned long)filters_used[k]); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED if (tIME_chunk_present != 0) @@ -1638,4 +1626,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_1beta05 your_png_h_is_not_version_1_4_1beta05; +typedef version_1_4_1beta06 your_png_h_is_not_version_1_4_1beta06;