From d2b574a4dea5b718e4386bf2e26af0126e5978ce Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Tue, 17 Aug 2021 16:54:07 +0200 Subject: [PATCH] tsan: test: Initialize all fields of Params struct Some compilers started complaining about the test: tsan_trace_test.cpp:128:21: error: missing field 'type' initializer Fix it by initializing all 5 fields, even though the type field will be reset in the for loop. Differential Revision: https://reviews.llvm.org/D108207 --- compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp b/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp index 571fc0ab04b8..f9d9b645335b 100644 --- a/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp +++ b/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp @@ -125,10 +125,10 @@ TEST(Trace, MemoryAccessSize) { } }; Thread::Params tests[] = { - {1, 0, 1, true}, {4, 0, 2, true}, - {4, 2, 2, true}, {8, 3, 1, true}, - {2, 1, 1, true}, {1, 1, 1, false}, - {8, 5, 4, false}, {4, static_cast(-1l), 4, false}, + {1, 0, 1, true, 0}, {4, 0, 2, true, 0}, + {4, 2, 2, true, 0}, {8, 3, 1, true, 0}, + {2, 1, 1, true, 0}, {1, 1, 1, false, 0}, + {8, 5, 4, false, 0}, {4, static_cast(-1l), 4, false, 0}, }; for (auto params : tests) { for (params.type = 0; params.type < 3; params.type++)