From nobody Tue Feb 10 01:59:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552908171598831.4948599506632; Mon, 18 Mar 2019 04:22:51 -0700 (PDT) Received: from localhost ([127.0.0.1]:39720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5qLn-0005OV-OR for importer@patchew.org; Mon, 18 Mar 2019 07:22:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5qJz-0004Nj-Ff for qemu-devel@nongnu.org; Mon, 18 Mar 2019 07:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5qJw-00048i-5m for qemu-devel@nongnu.org; Mon, 18 Mar 2019 07:20:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49920) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h5qJu-00047R-69 for qemu-devel@nongnu.org; Mon, 18 Mar 2019 07:20:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D2C33084215; Mon, 18 Mar 2019 11:20:41 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12E8C600C5; Mon, 18 Mar 2019 11:20:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2DF4D17535; Mon, 18 Mar 2019 12:20:38 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 18 Mar 2019 12:20:35 +0100 Message-Id: <20190318112038.11223-3-kraxel@redhat.com> In-Reply-To: <20190318112038.11223-1-kraxel@redhat.com> References: <20190318112038.11223-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 18 Mar 2019 11:20:41 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/5] curses ui: always initialize all curses_line fields 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: Samuel Thibault , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Samuel Thibault cchar_t can contain not only attr and chars fields, but also ext_color. Initialize the whole structure to zero instead of enumerating fields. Spotted by Coverity: CID 1399711 Signed-off-by: Samuel Thibault Message-Id: <20190315130932.26094-1-samuel.thibault@ens-lyon.org> Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Gerd Hoffmann --- ui/curses.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 3a7e8649f3de..4ef9b9c677ce 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -75,9 +75,9 @@ static void curses_update(DisplayChangeListener *dcl, if (vga_to_curses[ch].chars[0]) { curses_line[x] =3D vga_to_curses[ch]; } else { - curses_line[x].chars[0] =3D ch; - curses_line[x].chars[1] =3D 0; - curses_line[x].attr =3D 0; + curses_line[x] =3D (cchar_t) { + .chars[0] =3D ch, + }; } curses_line[x].attr |=3D at; } --=20 2.18.1