From: Daniel Arndt Date: Sat, 14 Oct 2017 12:25:16 +0000 (+0200) Subject: Fix undefined behavior in tests X-Git-Tag: v9.0.0-rc1~951^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01abff7fa7524171e83c0e4e0d4f9c2053d52ccb;p=dealii.git Fix undefined behavior in tests --- diff --git a/tests/bits/error_estimator_01.cc b/tests/bits/error_estimator_01.cc index 8afdd5538b..2627604794 100644 --- a/tests/bits/error_estimator_01.cc +++ b/tests/bits/error_estimator_01.cc @@ -66,15 +66,6 @@ get_q_face (Function &) } -Quadrature<0> & -get_q_face (Function<1> &) -{ - Quadrature<0> *q = nullptr; - return *q; -} - - - template void make_mesh (Triangulation &tria) { diff --git a/tests/bits/error_estimator_02.cc b/tests/bits/error_estimator_02.cc index 3aeb4fdb36..71aa8d2370 100644 --- a/tests/bits/error_estimator_02.cc +++ b/tests/bits/error_estimator_02.cc @@ -66,15 +66,6 @@ get_q_face (Function &) } -Quadrature<0> & -get_q_face (Function<1> &) -{ - Quadrature<0> *q = nullptr; - return *q; -} - - - template void make_mesh (Triangulation &tria) { diff --git a/tests/codim_one/error_estimator_01.cc b/tests/codim_one/error_estimator_01.cc index 7e4f1ffadb..3fa501143a 100644 --- a/tests/codim_one/error_estimator_01.cc +++ b/tests/codim_one/error_estimator_01.cc @@ -65,14 +65,6 @@ get_q_face () return q; } -template <> -Quadrature<0> & -get_q_face <1>() -{ - Quadrature<0> *q = nullptr; - return *q; -} - template void make_mesh (Triangulation &tria) { diff --git a/tests/codim_one/error_estimator_02.cc b/tests/codim_one/error_estimator_02.cc index 91953225f7..1ad1bd683e 100644 --- a/tests/codim_one/error_estimator_02.cc +++ b/tests/codim_one/error_estimator_02.cc @@ -93,13 +93,7 @@ get_q_face () return q; } -template <> -Quadrature<0> & -get_q_face <1>() -{ - Quadrature<0> *q = nullptr; - return *q; -} + template void make_mesh (Triangulation &tria) diff --git a/tests/numerics/boundaries.cc b/tests/numerics/boundaries.cc index dbba76cd1f..3bbc390164 100644 --- a/tests/numerics/boundaries.cc +++ b/tests/numerics/boundaries.cc @@ -67,14 +67,6 @@ boundary_q (const DoFHandler &) } -const Quadrature<0> & -boundary_q (const DoFHandler<1> &) -{ - static const Quadrature<0> *q = nullptr; - return *q; -} - - void write_map (const std::map &bv) { for (std::map::const_iterator diff --git a/tests/numerics/error_estimator.cc b/tests/numerics/error_estimator.cc index 5d9f429f8e..fc12eea806 100644 --- a/tests/numerics/error_estimator.cc +++ b/tests/numerics/error_estimator.cc @@ -66,16 +66,6 @@ get_q_face (Function &) } -Quadrature<0> & -get_q_face (Function<1> &) -{ - Quadrature<0> *q = nullptr; - return *q; -} - - - - template void check ()