[poppler] 2 commits - cmake/modules poppler/TextOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 4 22:10:56 UTC 2018


 cmake/modules/PopplerMacros.cmake |   22 ++++++++++++++++++++++
 poppler/TextOutputDev.cc          |    3 +--
 2 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit 718eb66aa4e6ab0ccbee16889534b32e0faeeb30
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Oct 5 00:10:31 2018 +0200

    cmake: Set the clang warnings based on the gcc ones

diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index 51cca111..08fd3d6d 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -147,6 +147,28 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   endif(GCC_HAS_AS_NEEDED)
 endif (CMAKE_COMPILER_IS_GNUCXX)
 
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+# set the default compile warnings
+  set(_warn "-Wall -Wextra -Wpedantic")
+  set(_warn "${_warn} -Wno-unused-parameter")
+  set(_warn "${_warn} -Wcast-align")
+  set(_warn "${_warn} -Wformat-security")
+  set(_warn "${_warn} -Wframe-larger-than=65536")
+  set(_warn "${_warn} -Wmissing-format-attribute")
+  set(_warn "${_warn} -Wnon-virtual-dtor")
+  set(_warn "${_warn} -Woverloaded-virtual")
+  set(_warn "${_warn} -Wmissing-declarations")
+  set(_warn "${_warn} -Wundef")
+  set(_warn "${_warn} -Wzero-as-null-pointer-constant")
+
+  # set extra warnings
+  set(_warnx "${_warnx} -Wconversion")
+  set(_warnx "${_warnx} -Wshadow")
+
+  set(DEFAULT_COMPILE_WARNINGS "${_warn}")
+  set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
+endif()
+
 if(CMAKE_C_COMPILER MATCHES "icc")
   set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
commit 9829cadbe10ad4cb468514ec68a3160e18f090bc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Oct 5 00:10:06 2018 +0200

    TextSelectionPainter: Remove unused member

diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 8995031c..0e4ab3b8 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -4583,7 +4583,7 @@ public:
 
 private:
   OutputDev *out;
-  GfxColor *box_color, *glyph_color;
+  GfxColor *glyph_color;
   GfxState *state;
   GooList *selectionList;
   Matrix ctm, ictm;
@@ -4597,7 +4597,6 @@ TextSelectionPainter::TextSelectionPainter(TextPage *page,
 					   GfxColor *glyph_color)
   : TextSelectionVisitor(page),
     out(out),
-    box_color(box_color),
     glyph_color(glyph_color)
 {
   PDFRectangle box(0, 0, page->pageWidth, page->pageHeight);


More information about the poppler mailing list