From a5bf4e3767ac7ce7980115f727f8974fe77c557d Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 24 Dec 2011 09:25:58 -0600 Subject: [PATCH] [libpng16] Initialize "passes" variable in pngread.c to avoid compiler warning. It was not actually possible to use it uninitialized but gcc doesn't know that. --- pngread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pngread.c b/pngread.c index 03cc70b26..3348a1b2a 100644 --- a/pngread.c +++ b/pngread.c @@ -1437,7 +1437,7 @@ png_image_read_composite(png_voidp argument) png_imagep image = display->image; png_structrp png_ptr = image->opaque->png_ptr; png_byte interlace_type = png_ptr->interlaced; - int passes; + int passes = 0; switch (interlace_type) { @@ -1567,7 +1567,7 @@ png_image_read_background(png_voidp argument) png_byte interlace_type = png_ptr->interlaced; png_uint_32 height = image->height; png_uint_32 width = image->width; - int pass, passes; + int pass, passes = 0; /* Double check the convoluted logic below. We expect to get here with * libpng doing rgb to gray and gamma correction but background processing