[poppler] utils/ImageOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Nov 15 11:08:31 PST 2013


 utils/ImageOutputDev.cc |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a23c9ad4c0536d680bedc563444ce3adf6e1ee9e
Author: Hib Eris <hib at hiberis.nl>
Date:   Fri Nov 15 11:38:45 2013 +0100

    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]
    
    Bug #71642

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 <jakob.voss at gbv.de>
 // Copyright (C) 2012, 2013 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Thomas Fischer <fischer at unix-ag.uni-kl.de>
+// Copyright (C) 2013 Hib Eris <hib at hiberis.nl>
 //
 // 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;


More information about the poppler mailing list