From b097f278ad9e9c4c3b506028d836e32c998c9936 Mon Sep 17 00:00:00 2001 From: Stefano Zampini Date: Sun, 25 Jun 2023 02:52:22 +0300 Subject: [PATCH] Fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit catching polymorphic type ‘class dealii::StandardExceptions::ExcFunctionNotProvided’ by value [-Wcatch-value=] --- tests/petsc/petsc_snes_02.cc | 2 +- tests/petsc/petsc_ts_01.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/petsc/petsc_snes_02.cc b/tests/petsc/petsc_snes_02.cc index d2edd32ac1..1ce565056e 100644 --- a/tests/petsc/petsc_snes_02.cc +++ b/tests/petsc/petsc_snes_02.cc @@ -77,7 +77,7 @@ main(int argc, char **argv) AssertThrow(snes == static_cast(mysolver), ExcInternalError()); mysolver.solve(v, A); } - catch (StandardExceptions::ExcFunctionNotProvided) + catch (StandardExceptions::ExcFunctionNotProvided &) { deallog << "catching expected exception" << std::endl; } diff --git a/tests/petsc/petsc_ts_01.cc b/tests/petsc/petsc_ts_01.cc index 92f7690b2b..43cdf09f7b 100644 --- a/tests/petsc/petsc_ts_01.cc +++ b/tests/petsc/petsc_ts_01.cc @@ -79,7 +79,7 @@ main(int argc, char **argv) AssertThrow(ts == static_cast(myode), ExcInternalError()); myode.solve(v, A); } - catch (StandardExceptions::ExcFunctionNotProvided) + catch (StandardExceptions::ExcFunctionNotProvided &) { deallog << "catching expected exception" << std::endl; } -- 2.39.5