cmake/modules/PopplerMacros.cmake | 2 +- configure.ac | 2 +- utils/ImageOutputDev.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 3ea09e735f81a2a16a204388bc474871aaa10271 Author: Adrian Johnson <[email protected]> Date: Sat Sep 2 17:50:58 2017 +0930 Fix warning when compiling with cygwin ImageOutputDev.cc:532:14: warning: âfâ may be used uninitialized in this function [-Wmaybe-uninitialized] diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc index 33cbb714..a7c2faea 100644 --- a/utils/ImageOutputDev.cc +++ b/utils/ImageOutputDev.cc @@ -376,7 +376,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; + FILE *f = nullptr; /* squelch bogus compiler warning */ ImageStream *imgStr = NULL; unsigned char *row; unsigned char *rowp; commit 6ef21aea5bb8b87f9a7e9217c316cd5e10612a62 Author: Adrian Johnson <[email protected]> Date: Sat Sep 2 17:50:35 2017 +0930 Fix cygwin 32-bit compile poppler/goo/gfile.cc: In function âGBool openTempFile(GooString**, FILE**, const char*)â: poppler/goo/gfile.cc:409:37: error: âmkstempâ was not declared in this scope fd = mkstemp((*name)->getCString()); ^ poppler/goo/gfile.cc:417:39: error: âfdopenâ was not declared in this scope if (fd < 0 || !(*f = fdopen(fd, mode))) { ^ poppler/goo/gfile.cc: In function âint Gfseek(FILE*, Goffset, int)â: poppler/goo/gfile.cc:558:34: error: âfseekoâ was not declared in this scope return fseeko(f, offset, whence); ^ poppler/goo/gfile.cc: In function âGoffset Gftell(FILE*)â: poppler/goo/gfile.cc:572:18: error: âftelloâ was not declared in this scope return ftello(f); ^ diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 8e3ef399..408e6dca 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -108,7 +108,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual -D_DEFAULT_SOURCE ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac index e511e8ba..e1b00fb7 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PROG_CC_STDC #fi AC_PROG_CXX AC_PROG_INSTALL -CXXFLAGS="$CXXFLAGS -std=c++11" +CXXFLAGS="$CXXFLAGS -std=c++11 -D_DEFAULT_SOURCE" dnl ##### Check for pkgconfig PKG_PROG_PKG_CONFIG
_______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
