From 6ff6556a531e06217fe5e7ad86d2093b3c79ea7c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Sep 2022 19:36:15 -0400 Subject: Fix uninitialized members --- test/test_hilbert.cpp | 2 +- test/test_utils.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_hilbert.cpp b/test/test_hilbert.cpp index ac4bba1..a0a64c0 100644 --- a/test/test_hilbert.cpp +++ b/test/test_hilbert.cpp @@ -39,7 +39,7 @@ template std::array make_random_point(Context& ctx, const std::array& ms) { - std::array p; + std::array p{}; for (size_t i = 0; i < D; ++i) { p[i] = rand_between(ctx, 0, (1UL << ms[i]) - 1); } diff --git a/test/test_utils.hpp b/test/test_utils.hpp index 3388552..65bd1b1 100644 --- a/test/test_utils.hpp +++ b/test/test_utils.hpp @@ -69,7 +69,7 @@ template std::array make_random_precisions(Context& ctx) { - std::array ms; + std::array ms{}; size_t bits_left = N; for (size_t i = 0; i < D; ++i) { @@ -85,7 +85,7 @@ template std::array make_random_point(Context& ctx) { - std::array p; + std::array p{}; for (size_t i = 0; i < D; ++i) { p[i] = rand_between(ctx, 0, (1UL << M) - 1); } -- cgit v1.2.1