]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make builds pass with -Werror on _my_ system
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 13 Sep 2022 13:07:28 +0000 (15:07 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 13 Sep 2022 13:07:28 +0000 (15:07 +0200)
m4/ax_check_sign.m4
m4/ax_cxx_compile_stdcxx.m4

index acc12624edcfd318b7a18b4bb2501bc42e9cb94f..a6b5e5778536fd50ac04a494361871c54fcb24ec 100644 (file)
@@ -43,7 +43,7 @@ AC_DEFUN([AX_CHECK_SIGN], [
  AC_CACHE_CHECK([whether $1 is signed], ax_cv_decl_${typename}_signed, [
    AC_COMPILE_IFELSE(
      [AC_LANG_PROGRAM([[$4]],
-       [[ int foo @<:@ 1 - 2 * !((($1) -1) < 0) @:>@ ]])],
+       [[ [[maybe_unused]] int foo @<:@ 1 - 2 * !((($1) -1) < 0) @:>@ ]])],
      [ eval "ax_cv_decl_${typename}_signed=\"yes\"" ],
      [ eval "ax_cv_decl_${typename}_signed=\"no\"" ])
  ])
index 43087b2e6889ec6f8ebd2f8ba77f4a9a716f8ac2..2aef96dd5b02486763199f44323eb001fd0f930e 100644 (file)
@@ -595,8 +595,7 @@ namespace cxx17
 
   namespace test_constexpr_lambdas
   {
-
-    constexpr int foo = [](){return 42;}();
+    [[maybe_unused]] constexpr int foo = [](){return 42;}();
 
   }