From: Timo Heister Date: Wed, 15 Feb 2023 18:03:58 +0000 (-0500) Subject: fix unused variable warning X-Git-Tag: v9.5.0-rc1~542^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b12a2ae339271ee8ae52e1a0d03f789b003147be;p=dealii.git fix unused variable warning It turns out that ``iteration`` is never read from in release mode because Assert() only triggers in debug mode. I am not sure what behavior we would like to have in release mode here, but this proposed change will get rid of the warning. --- diff --git a/source/grid/manifold.cc b/source/grid/manifold.cc index a4b08a1ca0..a9daffe930 100644 --- a/source/grid/manifold.cc +++ b/source/grid/manifold.cc @@ -979,12 +979,13 @@ FlatManifold::normal_vector( xi += delta_xi; ++iteration; - Assert(iteration < 10, - ExcMessage("The Newton iteration to find the reference point " - "did not converge in 10 iterations. Do you have a " - "deformed cell? (See the glossary for a definition " - "of what a deformed cell is. You may want to output " - "the vertices of your cell.")); + AssertThrow(iteration < 10, + ExcMessage( + "The Newton iteration to find the reference point " + "did not converge in 10 iterations. Do you have a " + "deformed cell? (See the glossary for a definition " + "of what a deformed cell is. You may want to output " + "the vertices of your cell.")); // It turns out that the check in reference coordinates with an absolute // tolerance can cause a convergence failure of the Newton method as