]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Try to avoid some more unused variable warnings. 18458/head
authorDavid Wells <drwells@email.unc.edu>
Fri, 16 May 2025 15:22:26 +0000 (11:22 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 16 May 2025 15:39:38 +0000 (11:39 -0400)
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

index 5ea7aec2cfb7080136b82709e3a7a7e5f6fcd927..9ad8f04afae46f624c3d1d15a1391d5cf8c10af0 100644 (file)
         }                                                                     \
       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*/

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.