From 189eb79d0e4479231f92c87b20af7f61d3e13c7f Mon Sep 17 00:00:00 2001 From: Remi Delmas Date: Wed, 7 Feb 2024 17:19:56 -0500 Subject: [PATCH] Fix `missing braces around initializer` GCC warning Fixes build failures with older GCC versions --- unit/goto-symex/shadow_memory_util.cpp | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/unit/goto-symex/shadow_memory_util.cpp b/unit/goto-symex/shadow_memory_util.cpp index fba733b43b8..3fec5ef0c4c 100644 --- a/unit/goto-symex/shadow_memory_util.cpp +++ b/unit/goto-symex/shadow_memory_util.cpp @@ -162,15 +162,15 @@ TEST_CASE( // Using mp_integer types otherwise on 32-bit machines n << 48 wraps around. std::array values = GENERATE( - std::array{0, 0, 0, 0, 0, 0, 0}, - std::array{1, 2, 3, 4, 5, 6, 7}, - std::array{2, 3, 4, 5, 6, 7, 1}, - std::array{3, 4, 5, 6, 7, 1, 2}, - std::array{4, 5, 6, 7, 1, 2, 3}, - std::array{5, 6, 7, 1, 2, 3, 4}, - std::array{6, 7, 1, 2, 3, 4, 5}, - std::array{7, 1, 2, 3, 4, 5, 6}, - std::array{8, 8, 8, 8, 8, 8, 8}); + std::array{{0, 0, 0, 0, 0, 0, 0}}, + std::array{{1, 2, 3, 4, 5, 6, 7}}, + std::array{{2, 3, 4, 5, 6, 7, 1}}, + std::array{{3, 4, 5, 6, 7, 1, 2}}, + std::array{{4, 5, 6, 7, 1, 2, 3}}, + std::array{{5, 6, 7, 1, 2, 3, 4}}, + std::array{{6, 7, 1, 2, 3, 4, 5}}, + std::array{{7, 1, 2, 3, 4, 5, 6}}, + std::array{{8, 8, 8, 8, 8, 8, 8}}); SECTION("test set " + std::to_string(values[0].to_long())) { @@ -279,15 +279,15 @@ TEST_CASE( // Using mp_integer types otherwise on 32-bit machines n << 48 wraps around. std::array values = GENERATE( - std::array{0, 0, 0, 0, 0, 0, 0}, - std::array{2, 0, 0, 0, 0, 0, 0}, - std::array{0, 2, 0, 0, 0, 0, 0}, - std::array{0, 0, 2, 0, 0, 0, 0}, - std::array{0, 0, 0, 2, 0, 0, 0}, - std::array{0, 0, 0, 0, 2, 0, 0}, - std::array{0, 0, 0, 0, 0, 2, 0}, - std::array{0, 0, 0, 0, 0, 0, 2}, - std::array{8, 8, 8, 8, 8, 8, 8}); + std::array{{0, 0, 0, 0, 0, 0, 0}}, + std::array{{2, 0, 0, 0, 0, 0, 0}}, + std::array{{0, 2, 0, 0, 0, 0, 0}}, + std::array{{0, 0, 2, 0, 0, 0, 0}}, + std::array{{0, 0, 0, 2, 0, 0, 0}}, + std::array{{0, 0, 0, 0, 2, 0, 0}}, + std::array{{0, 0, 0, 0, 0, 2, 0}}, + std::array{{0, 0, 0, 0, 0, 0, 2}}, + std::array{{8, 8, 8, 8, 8, 8, 8}}); SECTION("test set " + std::to_string(values[0].to_long())) {