From 917d49b675474c45b65ab6571d4ebcd3e5d4a448 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 16 May 2025 11:22:26 -0400 Subject: [PATCH] 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 --- include/deal.II/base/exception_macros.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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*/ -- 2.39.5