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
This commit is contained in:
Josh Gao 2016-03-14 18:15:15 -07:00
parent 0e00c168ce
commit d7878529b8
1 changed files with 4 additions and 2 deletions

View File

@ -387,13 +387,15 @@ TEST(signal, rt_tgsigqueueinfo) {
"* 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))