From 27fb04bc96999e101b45458c549345e864e085e9 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Wed, 10 Mar 2021 11:40:15 -0800 Subject: cmake: Fix optimization level for debug builds. (#6097) Further cleans up some unused variables and moves the configuration of best to configure.sh. --- test/unit/expr/node_black.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/unit/expr/node_black.cpp b/test/unit/expr/node_black.cpp index 61150799c..0d481ea4f 100644 --- a/test/unit/expr/node_black.cpp +++ b/test/unit/expr/node_black.cpp @@ -107,9 +107,12 @@ TEST_F(TestNodeBlackNode, copy_ctor) { Node e(Node::null()); } TEST_F(TestNodeBlackNode, dtor) { /* No access to internals? Only test that this is crash free. */ - Node* n; + Node* n = nullptr; ASSERT_NO_FATAL_FAILURE(n = new Node()); - delete n; + if (n) + { + delete n; + } } /* operator== */ -- cgit v1.2.3