From 22e59435e5a9ec2e2a509cc46452480ae8e94d1e Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 21 Dec 2023 09:46:17 -0500 Subject: [PATCH] Fix an unused variable warning. AFAICT this was fixed in GCC at some point. --- source/grid/tria_accessor.cc | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.39.5