[poppler] poppler/PSOutputDev.cc poppler/Stream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Jul 31 17:53:46 UTC 2017


 poppler/PSOutputDev.cc |    2 +-
 poppler/Stream.cc      |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 0e7f6cb1c42db3d65395365833472ff859def87a
Author: Jannick <thirdedition at gmx.net>
Date:   Mon Jul 31 19:53:12 2017 +0200

    Fix some warnings in some unusual #ifdef combinations
    
    Bug #101812

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index c7a6057d..0ff0bbb4 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3284,10 +3284,10 @@ GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
   int nStripes, stripeH, stripeY;
   int c, w, h, x, y, comp, i;
   int numComps, initialNumComps;
-#endif
   char hexBuf[32*2 + 2];	// 32 values X 2 chars/value + line ending + null
   Guchar digit;
   GBool isGray;
+#endif
 
   if (!postInitDone) {
     postInit();
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index e3d5cf6a..606902fe 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -221,7 +221,6 @@ Stream *Stream::makeFilter(char *name, Stream *str, Object *params, int recursio
   int encoding;
   GBool endOfLine, byteAlign, endOfBlock, black;
   int columns, rows;
-  int colorXform;
   Object globals, obj;
 
   if (!strcmp(name, "ASCIIHexDecode") || !strcmp(name, "AHx")) {
@@ -307,14 +306,14 @@ Stream *Stream::makeFilter(char *name, Stream *str, Object *params, int recursio
     str = new CCITTFaxStream(str, encoding, endOfLine, byteAlign,
 			     columns, rows, endOfBlock, black);
   } else if (!strcmp(name, "DCTDecode") || !strcmp(name, "DCT")) {
-    colorXform = -1;
+#if HAVE_DCT_DECODER
+    int colorXform = -1;
     if (params->isDict()) {
       if (params->dictLookup("ColorTransform", &obj, recursion)->isInt()) {
 	colorXform = obj.getInt();
       }
       obj.free();
     }
-#ifdef HAVE_DCT_DECODER
     str = new DCTStream(str, colorXform, dict, recursion);
 #else
     error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name);


More information about the poppler mailing list