From nobody Mon Nov 18 22:27:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546572; cv=none; d=zohomail.com; s=zohoarc; b=inWsbTKGXtisTLbrYZuMILYnyHQp63wQyU60U4FoCUZyDKV77BJElJLJUV3rjXzf2xa/KVLEqH/GD6u+I7iIgpkUZou6n2L04hiW4JJwILXZ2YSpR61l5RHepQZXzaxMJRntePJ7nNhiyFf392JmN56zxNVphK+buulBd8d+re8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546572; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=AWueTg/TrLdfRUdamINHfgRHBvc96BAPku23pH3/EUC8119Q5+lCYnO956NlI3usamQVIBEi8jV6n73z3CCIvXnpNvbhp75hXBYC0GzLkjV6WxQ5BHaeiiKXtEaKFbRdHnlZ/blQXWGPRio9+y/wP0hKI1hMCiNw/eqd1Ead3KQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546572942109.51547567524631; Mon, 12 Oct 2020 16:49:32 -0700 (PDT) Received: from localhost ([::1]:46928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7ZL-00057G-UF for importer@patchew.org; Mon, 12 Oct 2020 19:49:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UN-00007y-EF; Mon, 12 Oct 2020 19:44:23 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:39181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7UK-0007iM-R5; Mon, 12 Oct 2020 19:44:23 -0400 Received: by mail-pl1-x643.google.com with SMTP id y1so6085471plp.6; Mon, 12 Oct 2020 16:44:19 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=LBBEYcuhJff4cHl05cej1T9zO4dQ7NxZcNtHOLWSKLqGlzCmqVT21H5Kdd+P9xI25G jkAWARu0EDGKdyNXnLtwQl9yfdyqnzAm9+yhTf4SkgCB9AqOnAqjOPiVsE+C8I2uWK1C rGEUg1NDKb07qgUpq+ZkBJWR92Q6LX8EAUYazz3/Zx/9rfHjTKyruNuzjSuSXxMgp5Vx UrEyFbFi8VAWpjx59DeDTPUIjCeVGCvfL0W4pR18EAvBQhZ3UiQZLyg6VOJvMHLInFSV SrNlcNUz5GIaQj18Nts0YWzJBD3ubQeXeHgzaX0f+JnTCswzu9HlkttHNVxyKhZWxuvC BzcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=E8E0ICTzxG2Uv7RPzfXAXuQOw64M6HT7WFltU/mm2UG1eIZChTins3ZsXNtCz/Ij2v lt7tKhjrF5If+ma36Spejz40QnBd+atCTrfWrFq5xkg6S0iL0H1DZ636H3nb1wgX55N/ PQBVRoDwkgvK67XjSvauVBcmvp/mD2sb1Dehicak4pQWhltQOPlZLP7S+y6PKYuja0m3 8maZxVVjW0ZYV1hZybPDxG1txKFXJETXiKtieW1JZuLWkE400IwVsW77wpVgOcrIidST OD6hg6RXTy/RAzz12CQVJGtEzsosn4CXS9rjbHN7KM84IT3FqgggoqoXfZ/C2g06Vx9D huqQ== X-Gm-Message-State: AOAM53343/nUB/HZe/OOE08gpmwvNLMhwOKbzdZy0BPrX+3AyBBVp43U NyoMkHoE+NgULrG3O5jlrV4KvY6gXYF4CQ== X-Google-Smtp-Source: ABdhPJy/58DtfurzGjJVb9n/XcVrRoDGf8O4OqFASwEL1wCN9ISN7EXboSSVyCN/mWkLrhKJl0PNsw== X-Received: by 2002:a17:902:708c:b029:d3:ec3c:381c with SMTP id z12-20020a170902708cb02900d3ec3c381cmr25711024plk.20.1602546258066; Mon, 12 Oct 2020 16:44:18 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 3/5] curses: Fixes curses compiling errors. Date: Tue, 13 Oct 2020 07:43:46 +0800 Message-Id: <20201012234348.1427-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized= in this function [-Werror=3Dmaybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keyc= ode) | ^~~~~~~~~~ ../ui/curses.c:302:32: note: 'next_maybe_keycode' was declared here 302 | enum maybe_keycode next_maybe_keycode; | ^~~~~~~~~~~~~~~~~~ ../ui/curses.c:256:5: error: 'maybe_keycode' may be used uninitialized in t= his function [-Werror=3Dmaybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keyc= ode) | ^~~~~~~~~~ ../ui/curses.c:265:24: note: 'maybe_keycode' was declared here 265 | enum maybe_keycode maybe_keycode; | ^~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors gcc version 10.2.0 (Rev1, Built by MSYS2 project) Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 12bc682cf9..e4f9588c3e 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -262,7 +262,7 @@ static int curses2foo(const int _curses2foo[], const in= t _curseskey2foo[], static void curses_refresh(DisplayChangeListener *dcl) { int chr, keysym, keycode, keycode_alt; - enum maybe_keycode maybe_keycode; + enum maybe_keycode maybe_keycode =3D CURSES_KEYCODE; =20 curses_winch_check(); =20 @@ -299,7 +299,7 @@ static void curses_refresh(DisplayChangeListener *dcl) =20 /* alt or esc key */ if (keycode =3D=3D 1) { - enum maybe_keycode next_maybe_keycode; + enum maybe_keycode next_maybe_keycode =3D CURSES_KEYCODE; int nextchr =3D console_getch(&next_maybe_keycode); =20 if (nextchr !=3D -1) { --=20 2.28.0.windows.1