From nobody Wed Oct 29 06:55:00 2025 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524751452116945.5828455409227; Thu, 26 Apr 2018 07:04:12 -0700 (PDT) Received: from localhost ([::1]:42478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBhVL-0006sb-Bf for importer@patchew.org; Thu, 26 Apr 2018 10:04:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBhUD-0006N5-UT for qemu-devel@nongnu.org; Thu, 26 Apr 2018 10:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBhUA-0008AB-54 for qemu-devel@nongnu.org; Thu, 26 Apr 2018 10:03:01 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:41160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBhU9-00088x-U7; Thu, 26 Apr 2018 10:02:58 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fBhU6-0005sq-Gt; Thu, 26 Apr 2018 15:02:54 +0100 From: Peter Maydell To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Thu, 26 Apr 2018 15:02:53 +0100 Message-Id: <20180426140253.3918-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] vl.c: Don't zero-initialize statics for serial_hds 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: Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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" checkpatch reminds us that statics shouldn't be zero-initialized: ERROR: do not initialise statics to 0 or NULL #35: FILE: vl.c:157: +static int num_serial_hds =3D 0; ERROR: do not initialise statics to 0 or NULL #36: FILE: vl.c:158: +static Chardev **serial_hds =3D NULL; I forgot to fix this in 6af2692e86f9fdfb3d; do so now. Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth --- I wouldn't bother with this except that I forgot to fold it in when applying the serial-limits patchset. vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 616956adf1..6d8b869dad 100644 --- a/vl.c +++ b/vl.c @@ -154,8 +154,8 @@ QEMUClockType rtc_clock; int vga_interface_type =3D VGA_NONE; static DisplayOptions dpy; int no_frame; -static int num_serial_hds =3D 0; -static Chardev **serial_hds =3D NULL; +static int num_serial_hds; +static Chardev **serial_hds; Chardev *parallel_hds[MAX_PARALLEL_PORTS]; Chardev *virtcon_hds[MAX_VIRTIO_CONSOLES]; Chardev *sclp_hds[MAX_SCLP_CONSOLES]; --=20 2.17.0