From: David Wells Date: Fri, 16 May 2025 15:22:26 +0000 (-0400) Subject: Try to avoid some more unused variable warnings. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=917d49b675474c45b65ab6571d4ebcd3e5d4a448;p=dealii.git Try to avoid some more unused variable warnings. This is a follow-up to 0b04ac42897f03e31d7ce4aa0bcaf077df4a71ab: older versions of GCC print warnings when some variables are only used in an unreachable if constexpr() block. See also https://cdash.dealii.org/viewBuildError.php?type=1&buildid=2364 --- diff --git a/include/deal.II/base/exception_macros.h b/include/deal.II/base/exception_macros.h index 5ea7aec2cf..9ad8f04afa 100644 --- a/include/deal.II/base/exception_macros.h +++ b/include/deal.II/base/exception_macros.h @@ -616,14 +616,14 @@ } \ while (false) # else -# define Assert(cond, exc) \ - do \ - { \ - if constexpr (false) \ - if (!(cond)) \ - { \ - } \ - } \ +# define Assert(cond, exc) \ + do \ + { \ + if (false) \ + if (!(cond)) \ + { \ + } \ + } \ while (false) # endif #endif /*ifdef DEBUG*/