From f5d9a46481b6c1a8a95982858aa5a78bf840804f Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 22 Sep 2018 07:45:16 +0200 Subject: [PATCH] Avoid warnings in a few tests --- tests/optimization/step-44.h | 9 +++------ tests/rol/vector_adaptor_02.cc | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/optimization/step-44.h b/tests/optimization/step-44.h index 649d203a1e..ec1e8a399b 100644 --- a/tests/optimization/step-44.h +++ b/tests/optimization/step-44.h @@ -1328,11 +1328,8 @@ namespace Step44 // Minimization function (exact) auto ls_minimization_function = - [this, - &residual_0, - &solution_delta, - &newton_update, - &tang_mtrx_norm_old](const double ss /*step size*/) { + [this, &solution_delta, &newton_update, &tang_mtrx_norm_old]( + const double ss /*step size*/) { // Ensure that the constraints for the Dirichlet BC's are correct, // irrespective of the chosen step size. BlockVector solution_delta_trial(newton_update); @@ -1350,10 +1347,10 @@ namespace Step44 BlockVector residual_trial = this->system_rhs; residual_trial *= -1.0; // Residual = -RHS - const double tang_mtrx_norm_new = tangent_matrix.block(0, 0).frobenius_norm(); + (void)tang_mtrx_norm_new; if (ss != 0.0) Assert(tang_mtrx_norm_new != tang_mtrx_norm_old, ExcInternalError()); diff --git a/tests/rol/vector_adaptor_02.cc b/tests/rol/vector_adaptor_02.cc index ec21970509..616fbb338c 100644 --- a/tests/rol/vector_adaptor_02.cc +++ b/tests/rol/vector_adaptor_02.cc @@ -51,7 +51,7 @@ private: public: Real - value(const ROL::Vector &x, Real &tol) + value(const ROL::Vector &x, Real & /*tol*/) { Assert(x.dimension() == 2, ExcInternalError()); @@ -59,7 +59,7 @@ public: } void - gradient(ROL::Vector &g, const ROL::Vector &x, Real &tol) + gradient(ROL::Vector &g, const ROL::Vector &x, Real & /*tol*/) { Teuchos::RCP xp = this->get_rcp_to_VectorType(x); Teuchos::RCP gp = this->get_rcp_to_VectorType(g); @@ -101,7 +101,7 @@ test(const double x, const double y) } int -main(int argc, char **argv) +main() { try { -- 2.39.5