diff options
author | Albert Astals Cid <aacid@kde.org> | 2024-03-31 17:12:43 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2024-03-31 17:34:10 +0200 |
commit | 1446d1fd2186e6573e737406c02a54c36fe1ad71 (patch) | |
tree | ab70de565302e7ba302fba20af33227024888c96 | |
parent | 80e0519077f74e2591d45e70801f6c3f2fe2c362 (diff) |
CI: Use Fedora for clazy, it's newer and built against a newer clang
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rw-r--r-- | poppler/FlateEncoder.cc | 2 | ||||
-rw-r--r-- | qt6/tests/check_search.cpp | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 560689b6..313a3e18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,12 +97,16 @@ build_mingw64_fedora40: - mingw64-cmake -DENABLE_NSS3=OFF -DENABLE_GPGME=OFF -G Ninja .. - ninja -build_clazy_clang16: +build_clazy_fedora40: stage: build + image: fedora:40 + before_script: + - dnf install -y 'dnf-command(builddep)' + - dnf builddep -y poppler + - dnf -y install clazy ninja-build glibc-langpack-en script: - - apt-get install --yes --no-install-recommends clazy clang-16 - mkdir -p build && cd build - - CC=clang-16 CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DENABLE_GPGME=OFF -G Ninja .. + - CC=clang-18 CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja .. - CLAZY_CHECKS="level0,level1,level2,isempty-vs-count,qhash-with-char-pointer-key,tr-non-literal,no-non-pod-global-static" ninja -j ${FDO_CI_CONCURRENT} build_qt5_android: diff --git a/poppler/FlateEncoder.cc b/poppler/FlateEncoder.cc index 0786565d..0ae1d528 100644 --- a/poppler/FlateEncoder.cc +++ b/poppler/FlateEncoder.cc @@ -31,7 +31,7 @@ FlateEncoder::FlateEncoder(Stream *strA) : FilterStream(strA) // -Wzero-as-null-pointer-constant warning. // For safety, check that the Z_NULL definition is equivalent to // 0 / null pointer. - static_assert(Z_NULL == 0); + static_assert(static_cast<int>(Z_NULL) == 0); zlib_stream.zalloc = nullptr; zlib_stream.zfree = nullptr; zlib_stream.opaque = nullptr; diff --git a/qt6/tests/check_search.cpp b/qt6/tests/check_search.cpp index 6c19e6ea..384088f8 100644 --- a/qt6/tests/check_search.cpp +++ b/qt6/tests/check_search.cpp @@ -357,8 +357,8 @@ void TestSearch::testAcrossLinesSearch() QCOMPARE(page0->search(across_block, l, t, r, b, direction, mode2W), true); // Now for completeness, we will match the full text of two lines - const QString full2lines = QString::fromUtf8( - "Las pruebas se practicarán en vista pública, si bien, excepcionalmente, el Tribunal podrá acordar, mediante providencia, que determinadas pruebas se celebren fuera del acto de juicio"); // clazy:exclude=qstring-allocations + const QString full2lines = QString::fromUtf8( // clazy:exclude=qstring-allocations + "Las pruebas se practicarán en vista pública, si bien, excepcionalmente, el Tribunal podrá acordar, mediante providencia, que determinadas pruebas se celebren fuera del acto de juicio"); QCOMPARE(page->search(full2lines, l, t, r, b, direction, mode0), true); QCOMPARE(page->search(full2lines, l, t, r, b, direction, mode1), true); QCOMPARE(page->search(full2lines, l, t, r, b, direction, mode2), true); |