From 1cb9353f239f38c28c0c23bef318c5447ca766b7 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 15 Nov 2013 11:38:45 +0100 Subject: [PATCH] Silence warning for may be used uninitialized variable in ImageOutputDec.cc Fixes warning: CXX ImageOutputDev.lo ImageOutputDev.cc: In member function 'void ImageOutputDev::writeImageFile(ImgWriter*, ImageOutputDev::ImageFormat, const char*, Stream*, int, int, GfxImageColorMap*)': ImageOutputDev.cc:409:28: warning: 'imgStr' may be used uninitialized in this function [-Wmaybe-uninitialized] --- utils/ImageOutputDev.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc index 93ed0fe..5de51ad 100644 --- a/utils/ImageOutputDev.cc +++ b/utils/ImageOutputDev.cc @@ -22,6 +22,7 @@ // Copyright (C) 2010 Jakob Voss // Copyright (C) 2012, 2013 Adrian Johnson // Copyright (C) 2013 Thomas Fischer +// Copyright (C) 2013 Hib Eris // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -316,7 +317,7 @@ void ImageOutputDev::writeRawImage(Stream *str, const char *ext) { void ImageOutputDev::writeImageFile(ImgWriter *writer, ImageFormat format, const char *ext, Stream *str, int width, int height, GfxImageColorMap *colorMap) { FILE *f; - ImageStream *imgStr; + ImageStream *imgStr = NULL; unsigned char *row; unsigned char *rowp; Guchar *p; -- 1.8.1.2