From 840a27f0dd2fc56de1ed670100a46b97d263529e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Tue, 29 Mar 2022 22:51:07 +0200 Subject: [PATCH] Fix a g++-9 warning Quite a strange warning: suggested parenthesis in a Catch2 macro expansion --- tests/test_SubItemValuePerItem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_SubItemValuePerItem.cpp b/tests/test_SubItemValuePerItem.cpp index 08d421fc1..65741d700 100644 --- a/tests/test_SubItemValuePerItem.cpp +++ b/tests/test_SubItemValuePerItem.cpp @@ -63,7 +63,8 @@ TEST_CASE("SubItemValuePerItem", "[mesh]") }; auto check_same_memory = [](const auto& sub_item_value_per_item, auto array) { - REQUIRE(sub_item_value_per_item.numberOfValues() == array.size()); + const bool same_size = (sub_item_value_per_item.numberOfValues() == array.size()); + REQUIRE(same_size); bool is_same = true; for (size_t i = 0; i < sub_item_value_per_item.numberOfValues(); ++i) { is_same &= (&(sub_item_value_per_item[i]) == &(array[i])); -- GitLab