From 01abff7fa7524171e83c0e4e0d4f9c2053d52ccb Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sat, 14 Oct 2017 14:25:16 +0200 Subject: [PATCH] Fix undefined behavior in tests --- tests/bits/error_estimator_01.cc | 9 --------- tests/bits/error_estimator_02.cc | 9 --------- tests/codim_one/error_estimator_01.cc | 8 -------- tests/codim_one/error_estimator_02.cc | 8 +------- tests/numerics/boundaries.cc | 8 -------- tests/numerics/error_estimator.cc | 10 ---------- 6 files changed, 1 insertion(+), 51 deletions(-) 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 () -- 2.39.5