From a86f0a75e9fd11e5943f0dea67af855193aead18 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Tue, 3 Jan 2017 04:48:34 +0100 Subject: [PATCH] src/driver/pictureviewer/png.cpp: Fix -Wclobbered compiler warning Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/617075c30ea54374e80a353a4c3b68a8ffc5602c Author: Michael Liebmann Date: 2017-01-03 (Tue, 03 Jan 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/pictureviewer/png.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index c684eecf3..83b01976b 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -35,7 +35,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int int bit_depth, color_type, interlace_type, number_passes, pass, int_bpp; png_byte * fbptr; FILE * fh; - bool updateInfo_alreadyRead = false; + bool updateInfo_alreadyRead; if(!(fh=fopen(name,"rb"))) return(FH_ERROR_FILE); @@ -64,6 +64,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int png_init_io(png_ptr,fh); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL); + updateInfo_alreadyRead = false; if (alpha) // 24bit or gray scale PNGs with alpha-channel { *bpp = png_get_channels(png_ptr, info_ptr);