diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-13 05:38:57 +0800 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-14 19:26:45 +0800 |
| commit | 8aa2a9e0339215012354f3c4a262edda838134e8 (patch) | |
| tree | 0c9e59246bcaf26bfb76478ca92cc12e9b43f8a0 /posix | |
| parent | 1d40170dd367831b97cbdb89ad1b7241a241923b (diff) | |
Add braces in initializers for GCC 4.9 or older
Add braces to silence GCC 4.9 or older:
getaddrinfo.c: In function ‘gaih_inet’:
getaddrinfo.c:1135:24: error: missing braces around initializer [-Werror=missing-braces]
/ sizeof (struct gaih_typeproto)] = {0};
^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'posix')
| -rw-r--r-- | posix/tst-spawn7.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/tst-spawn7.c b/posix/tst-spawn7.c index e4adc6cbf0..0b67b35d77 100644 --- a/posix/tst-spawn7.c +++ b/posix/tst-spawn7.c @@ -114,7 +114,7 @@ do_test_signals (void) { /* Same as before, but set SIGUSR1 and SIGUSR2 to a handler different than SIG_IGN or SIG_DFL. */ - struct sigaction sa = { 0 }; + struct sigaction sa = { { 0 } }; sa.sa_handler = dummy_sa_handler; xsigaction (SIGUSR1, &sa, NULL); xsigaction (SIGUSR2, &sa, NULL); @@ -123,7 +123,7 @@ do_test_signals (void) { /* Check if SIG_IGN is keep as is. */ - struct sigaction sa = { 0 }; + struct sigaction sa = { { 0 } }; sa.sa_handler = SIG_IGN; xsigaction (SIGUSR1, &sa, NULL); xsigaction (SIGUSR2, &sa, NULL); |
