From patchwork Thu Jul 20 16:32:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 108424 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2353685qge; Thu, 20 Jul 2017 09:32:22 -0700 (PDT) X-Received: by 10.223.169.145 with SMTP id b17mr7221875wrd.179.1500568342735; Thu, 20 Jul 2017 09:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500568342; cv=none; d=google.com; s=arc-20160816; b=TUejIzjoEr8iD53dJV6tcrCXsMhlidQid75rZUXVwW229xB3TEN9JJPI4JbOsZ6lAt aZfkB1IsmIvzu4F21O44hC/jG44ttjP5KnWaYuStmayd9FgVFzYwppeHvwfsJk+JjB4e GJK1fFJVTXdLDWkwLvQeIsGvQAsGeJDI72GkL47ZLyaH1pftHdNouOci2ckOrcE4SMtG 6qVN2RHXgjq1HazTqhyzUwEFLigLAAc9Icos9tD8OTgW4uEkqGPPQVNMu6TSS12iei5d +VPp21s1imeRZKVBem5/8novqpvQlZ1v1W6lVsYjz3+SUcycI+3W+4xQlZXvISkJGWvU K3dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=ySOzCN8/6QdrBqsgYPVR+0PrU6lrxspGG8OTmbJPYvI=; b=S07sP5R7SwwICWvMM5rAN2OKSYVCSKemvL7MlRo8tEiFX+fEPawYZy4lguVj2SKaN+ 3rZ7QWRDRtiLzUFqTgIURBkXc2YdIl6e07XEuLaOp9qimdQ6pmRaInQjRTs0S4LtTJXH wY1ZViC09RyWKh8c37IlMWzoPk2CNuxLq8Wn0iGkng4l5PsEnqiK7Br6KG+zov3pmzZG BHFGbYjBjjUSJZiokpC0YKoYo6uG09vu6ZXVaySIU2/Fa1ZAiMFTE3nkCqcpbeFNq0Iu fIgrC0jGa+yI3+owHGvtxWFXa9FYJz7VcYBVTyNbsR7WAft3b6C564AZzcteYYLbszQk KTlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id i25si2607366wrb.477.2017.07.20.09.32.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2017 09:32:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dYENC-0007eq-AU; Thu, 20 Jul 2017 17:32:22 +0100 From: Peter Maydell To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: patches@linaro.org, Kamil Rytarowski Subject: [PATCH for-2.10] util/oslib-posix.c: Avoid warning on NetBSD Date: Thu, 20 Jul 2017 17:32:21 +0100 Message-Id: <1500568341-8389-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 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 --- util/oslib-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Reviewed-by: Eric Blake diff --git a/util/oslib-posix.c b/util/oslib-posix.c index b2dea48..cacf0ef 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;