From 1c826e396754c6f4f720e4cb4fb188946908007a Mon Sep 17 00:00:00 2001 From: Yi-Yung Yang Date: Mon, 12 Aug 2024 18:17:49 -0400 Subject: [PATCH] Replaced void with maybe_unused --- tests/matrix_free/matrix_vector_hessians_cells.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/matrix_free/matrix_vector_hessians_cells.cc b/tests/matrix_free/matrix_vector_hessians_cells.cc index 6256a798fc..d8f4340a8a 100644 --- a/tests/matrix_free/matrix_vector_hessians_cells.cc +++ b/tests/matrix_free/matrix_vector_hessians_cells.cc @@ -68,14 +68,15 @@ test_hessians(const dealii::FE_Poly &fe, additional_data.mapping_update_flags_inner_faces = update_values | update_gradients | update_hessians; - MatrixFree matrix_free; + [[maybe_unused]]MatrixFree matrix_free; matrix_free.reinit(mapping, dof_handler, constraints, quad, additional_data); if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0) deallog << "Working with " << fe.get_name() << " and " << dof_handler.n_dofs() << " dofs" << std::endl; - LinearAlgebra::distributed::Vector src, dst, dst2; + LinearAlgebra::distributed::Vector dst2; + [[maybe_unused]]LinearAlgebra::distributed::Vector src, dst; matrix_free.initialize_dof_vector(src); for (auto &v : src) v = random_value(); @@ -101,7 +102,7 @@ test_hessians(const dealii::FE_Poly &fe, matrix_free.template loop, LinearAlgebra::distributed::Vector>( [&]( - const auto &matrix_free, auto &dst, const auto &src, const auto &range) { + const auto &matrix_free, auto &dst, const auto &src, [[maybe_unused]]const auto &range) { FEEvaluation fe_eval( matrix_free); for (unsigned int cell = range.first; cell < range.second; ++cell) @@ -185,17 +186,9 @@ test_hessians(const dealii::FE_Poly &fe, }, [&]( const auto &matrix_free, auto &dst, const auto &src, const auto &range) { - (void)matrix_free; - (void)dst; - (void)src; - (void)range; }, [&]( const auto &matrix_free, auto &dst, const auto &src, const auto &range) { - (void)matrix_free; - (void)dst; - (void)src; - (void)range; }, dst, src, -- 2.39.5