.gitlab-ci.yml | 2 +- cmake/modules/PopplerMacros.cmake | 3 +++ poppler/Annot.cc | 2 +- qt5/src/poppler-annotation-private.h | 1 - qt5/src/poppler-link.h | 6 +++--- qt5/tests/check_object.cpp | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-)
New commits: commit 337585e3d881c2c2c9099888b09902119dc05bf8 Author: Albert Astals Cid <[email protected]> Date: Thu Oct 3 13:52:49 2019 +0200 Set our default cxx and c flags to clang too This code needs a bit of refactoring to share most of it between gcc and clang diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 4474ff3d..5ccbc4ef 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -165,6 +165,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(DEFAULT_COMPILE_WARNINGS "${_warn}") set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}") + + set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE") + set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE") endif() if(CMAKE_C_COMPILER MATCHES "icc") commit 442be9e34a6af9295ccd487b3091a1abcd4a77ce Author: Albert Astals Cid <[email protected]> Date: Thu Oct 3 13:37:10 2019 +0200 Enable a few more clang-tidy bugprone checks diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42bdb899..635e9bf0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ build_clang_libcpp: script: - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data - mkdir -p build && cd build - - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,bugprone-too-small-loop-variable;-warnings-as-errors=*" .. + - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" .. - ninja - ctest --output-on-failure diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 56b9b933..9899c880 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -4345,7 +4345,7 @@ bool AnnotAppearanceBuilder::drawText(const GooString *text, const GooString *da x = borderWidth; break; case quaddingCentered: - x = borderWidth + (comb - charCount) / 2 * w; + x = borderWidth + (comb - charCount) / 2.0 * w; break; case quaddingRightJustified: x = borderWidth + (comb - charCount) * w; diff --git a/qt5/src/poppler-annotation-private.h b/qt5/src/poppler-annotation-private.h index c63a86dd..a39c2137 100644 --- a/qt5/src/poppler-annotation-private.h +++ b/qt5/src/poppler-annotation-private.h @@ -32,7 +32,6 @@ class Annot; class AnnotPath; -class Link; class Page; class PDFRectangle; diff --git a/qt5/src/poppler-link.h b/qt5/src/poppler-link.h index 766124ac..7f52e203 100644 --- a/qt5/src/poppler-link.h +++ b/qt5/src/poppler-link.h @@ -1,5 +1,5 @@ /* poppler-link.h: qt interface to poppler - * Copyright (C) 2006, 2013, 2016, 2018, Albert Astals Cid <[email protected]> + * Copyright (C) 2006, 2013, 2016, 2018, 2019, Albert Astals Cid <[email protected]> * Copyright (C) 2007-2008, 2010, Pino Toscano <[email protected]> * Copyright (C) 2010, 2012, Guillermo Amaral <[email protected]> * Copyright (C) 2012, Tobias Koenig <[email protected]> @@ -34,8 +34,6 @@ struct Ref; class MediaRendition; -class MovieAnnotation; -class ScreenAnnotation; namespace Poppler { @@ -53,6 +51,8 @@ class LinkRenditionPrivate; class LinkOCGStatePrivate; class LinkHidePrivate; class MediaRendition; +class MovieAnnotation; +class ScreenAnnotation; class SoundObject; /** diff --git a/qt5/tests/check_object.cpp b/qt5/tests/check_object.cpp index f8531fbc..c3ece944 100644 --- a/qt5/tests/check_object.cpp +++ b/qt5/tests/check_object.cpp @@ -21,8 +21,8 @@ void TestObject::benchDefaultConstructor() { } void TestObject::benchMoveConstructor() { - Object src; QBENCHMARK { + Object src; Object dst{std::move(src)}; } } _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
