Skip to content

Commit

Permalink
Merge pull request #16375 from drwells/fix-warning
Browse files Browse the repository at this point in the history
Fix an unused variable warning.
  • Loading branch information
bangerth committed Dec 21, 2023
2 parents 4211016 + 22e5943 commit 02bb9b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/grid/tria_accessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,10 @@ void
CellAccessor<dim, spacedim>::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,
Expand Down

0 comments on commit 02bb9b2

Please sign in to comment.