[poppler] .gitlab-ci.yml glib/poppler-cached-file-loader.cc poppler/CairoOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 26 22:19:30 UTC 2021


 .gitlab-ci.yml                     |    2 +-
 glib/poppler-cached-file-loader.cc |    4 +---
 poppler/CairoOutputDev.cc          |    3 ---
 3 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit ce644167f258e5a2f53e26976514a14866c77365
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Oct 26 23:40:41 2021 +0200

    CI: Enable -Werror in the clang 13 builder too
    
    We have it on the clazy builder too, but unfortunately clazy is still
    built against clang 11 in debian:unstable so we get less coverage there

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 029d0e8e..35418db0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,7 +59,7 @@ build_clang13_libcpp:
     - mkdir -p build && cd build
     - apt-get install --yes --no-install-recommends libclang-13-dev llvm-13-dev libc++-13-dev libc++abi-13-dev clang-tidy-13 clang-13 libunwind-13-dev
     - clang++-13 -fPIC -shared -o goostring-format-checker.so ../test/goostring-format-checker/goostring-format-checker.cc -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I /usr/lib/llvm-13/include/
-    - CC=clang-13 CXX=clang++-13 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker" -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy-13;-header-filter=.;-checks=-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,google-explicit-constructor,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation,-bugprone-sizeof-expression,-bugprone-branch-clone,-bugprone-reserved-identifier,-bugprone-suspicious-include,-performance-no-int-to-ptr,-bugprone-easily-swappable-parameters,-bugprone
 -implicit-widening-of-multiplication-result;-warnings-as-errors=*" .. -DCMAKE_PREFIX_PATH=$PWD/../6.1.0/gcc_64/lib/cmake
+    - CC=clang-13 CXX=clang++-13 cmake -G Ninja -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Xclang -load -Xclang $PWD/goostring-format-checker.so -Xclang -add-plugin -Xclang goostring-format-checker -Werror -Wno-deprecated-declarations" -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy-13;-header-filter=.;-checks=-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-use-bool-literals,modernize-redundant-void-arg,modernize-loop-convert,google-explicit-constructor,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation,-bugprone-sizeof-expression,-bugprone-branch-clone,-bugprone-reserved-identifier,-bugprone-suspicious-include,-performance-no-int-to-ptr,-bugprone-
 easily-swappable-parameters,-bugprone-implicit-widening-of-multiplication-result;-warnings-as-errors=*" .. -DCMAKE_PREFIX_PATH=$PWD/../6.1.0/gcc_64/lib/cmake
     - ninja
     - ctest --output-on-failure
 
diff --git a/glib/poppler-cached-file-loader.cc b/glib/poppler-cached-file-loader.cc
index def0cde8..097e6645 100644
--- a/glib/poppler-cached-file-loader.cc
+++ b/glib/poppler-cached-file-loader.cc
@@ -82,12 +82,11 @@ int PopplerCachedFileLoader::load(const std::vector<ByteRange> &ranges, CachedFi
 {
     char buf[CachedFileChunkSize];
     gssize bytesRead;
-    size_t rangeBytesRead, bytesToRead, size;
+    size_t rangeBytesRead, bytesToRead;
 
     if (length == (goffset)-1)
         return 0;
 
-    size = 0;
     for (const ByteRange &range : ranges) {
         bytesToRead = MIN(CachedFileChunkSize, range.length);
         rangeBytesRead = 0;
@@ -98,7 +97,6 @@ int PopplerCachedFileLoader::load(const std::vector<ByteRange> &ranges, CachedFi
                 return -1;
 
             writer->write(buf, bytesRead);
-            size += bytesRead;
             rangeBytesRead += bytesRead;
             bytesToRead = range.length - rangeBytesRead;
         } while (bytesRead > 0 && bytesToRead > 0);
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index e3606418..93975609 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -2333,11 +2333,9 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
         }
 
         lastYStep = yStep;
-        int k1 = y;
 
         int xt = 0;
         int xSrc = 0;
-        int x1 = k1;
         int n = yStep > 0 ? yStep : 1;
         int origN = n;
 
@@ -2386,7 +2384,6 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
             }
             buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN * m));
             xSrc += xStep;
-            x1 += 1;
         }
     }
     free(pixBuf);


More information about the poppler mailing list