From nobody Sun Apr 28 11:09:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500569534927967.2896194891996; Thu, 20 Jul 2017 09:52:14 -0700 (PDT) Received: from localhost ([::1]:39048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYEOw-0001Wh-5Z for importer@patchew.org; Thu, 20 Jul 2017 12:34:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYENE-0000Nu-9l for qemu-devel@nongnu.org; Thu, 20 Jul 2017 12:32:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYEND-0007gH-E7 for qemu-devel@nongnu.org; Thu, 20 Jul 2017 12:32:24 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYEND-0007fo-7o; Thu, 20 Jul 2017 12:32:23 -0400 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 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH for-2.10] util/oslib-posix.c: Avoid warning on NetBSD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" On NetBSD the compiler warns: util/oslib-posix.c: In function 'sigaction_invoke': util/oslib-posix.c:589:5: warning: missing braces around initializer [-Wmis= sing-braces] siginfo_t si =3D { 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 Reviewed-by: Eric Blake --- util/oslib-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =3D { 0 }; + siginfo_t si =3D {}; si.si_signo =3D info->ssi_signo; si.si_errno =3D info->ssi_errno; si.si_code =3D info->ssi_code; --=20 2.7.4