From: David Wells Date: Thu, 21 Dec 2023 14:46:17 +0000 (-0500) Subject: Fix an unused variable warning. X-Git-Tag: relicensing~232^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16375%2Fhead;p=dealii.git Fix an unused variable warning. AFAICT this was fixed in GCC at some point. --- diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index 4c084ea65f..b9a9c0cfd5 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -2245,6 +2245,10 @@ void CellAccessor::set_direction_flag( const bool new_direction_flag) const { + // Some older compilers (GCC 9) print an unused variable warning about + // new_direction_flag when it is only used in a subset of 'if constexpr' + // statements + (void)new_direction_flag; Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); if constexpr (dim == spacedim) Assert(new_direction_flag == true,