summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell2017-07-20 18:32:21 +0200
committerPeter Maydell2017-07-21 11:32:19 +0200
commit02ffa034fb747f09a4f5658ed64871dcee4aaca2 (patch)
treed094903e18f170e33dbc6eeebc0d09525c4a07cd /util
parentMerge remote-tracking branch 'remotes/kraxel/tags/usb-20170720-pull-request' ... (diff)
downloadqemu-02ffa034fb747f09a4f5658ed64871dcee4aaca2.tar.gz
qemu-02ffa034fb747f09a4f5658ed64871dcee4aaca2.tar.xz
qemu-02ffa034fb747f09a4f5658ed64871dcee4aaca2.zip
util/oslib-posix.c: Avoid warning on NetBSD
On NetBSD the compiler warns: util/oslib-posix.c: In function 'sigaction_invoke': util/oslib-posix.c:589:5: warning: missing braces around initializer [-Wmissing-braces] siginfo_t si = { 0 }; ^ util/oslib-posix.c:589:5: warning: (near initialization for 'si.si_pad') [-Wmissing-braces] because on this platform siginfo_t is defined as typedef union siginfo { char si_pad[128]; /* Total size; for future expansion */ struct _ksiginfo _info; } siginfo_t; Avoid this warning by initializing the struct with {} instead; this is a GCC extension but we use it all over the codebase already. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1500568341-8389-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index b2dea48f40..cacf0ef5e3 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -586,7 +586,7 @@ void qemu_free_stack(void *stack, size_t sz)
void sigaction_invoke(struct sigaction *action,
struct qemu_signalfd_siginfo *info)
{
- siginfo_t si = { 0 };
+ siginfo_t si = {};
si.si_signo = info->ssi_signo;
si.si_errno = info->ssi_errno;
si.si_code = info->ssi_code;