CI: Use Fedora for clazy, it's newer and built against a newer clang
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 560689b..313a3e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -97,12 +97,16 @@
     - 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 0786565..0ae1d52 100644
--- a/poppler/FlateEncoder.cc
+++ b/poppler/FlateEncoder.cc
@@ -31,7 +31,7 @@
     // -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 6c19e6e..384088f 100644
--- a/qt6/tests/check_search.cpp
+++ b/qt6/tests/check_search.cpp
@@ -357,8 +357,8 @@
     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);