Skip to content

Commit c4972d3

Browse files
[test] Add some default initialization in shuffle_test to please gcc static analysis
The extra initialization is redundant with the call to std::fill, but GCC 13 seems to ignore it. And it's just tests so not performance critical.
1 parent 6b61b1a commit c4972d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_shuffle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ struct shuffle_test
620620
void transpose()
621621
{
622622
B b_lhs = B::load_unaligned(lhs.data());
623-
std::array<B, size> b_matrix;
623+
std::array<B, size> b_matrix = {};
624624
for (size_t i = 0; i < size; ++i)
625625
b_matrix[i] = b_lhs;
626-
std::array<value_type, size * size> ref_matrix;
626+
std::array<value_type, size * size> ref_matrix = {};
627627
for (size_t i = 0; i < size; ++i)
628628
for (size_t j = 0; j < size; ++j)
629629
ref_matrix[i * size + j] = lhs[i];

0 commit comments

Comments
 (0)