Silence false positive warnings on GCC.
We still use GCC to build the bionic unit tests into CTS, and it emits a
false positive -Wmissing-field-initializers warning for the C++11 aggregate
initialization syntax `Foo foo = {}`.
Bug: http://b/27656293
Change-Id: I016d8dae6d6cd28afe4bc19250c2a8fba908f8e6
diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp
index 8c1e834..32308aa 100644
--- a/tests/signal_test.cpp
+++ b/tests/signal_test.cpp
@@ -387,13 +387,15 @@
"* https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=66dd34ad31e5963d72a700ec3f2449291d322921\n";
static siginfo received;
- struct sigaction handler = {};
+ struct sigaction handler;
+ memset(&handler, 0, sizeof(handler));
handler.sa_sigaction = [](int, siginfo_t* siginfo, void*) { received = *siginfo; };
handler.sa_flags = SA_SIGINFO;
ASSERT_EQ(0, sigaction(SIGUSR1, &handler, nullptr));
- siginfo sent = {};
+ siginfo sent;
+ memset(&sent, 0, sizeof(sent));
sent.si_code = SI_TKILL;
ASSERT_EQ(0, syscall(SYS_rt_tgsigqueueinfo, getpid(), gettid(), SIGUSR1, &sent))