From nobody Sun May 5 20:00:58 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510087682268544.0522428105022; Tue, 7 Nov 2017 12:48:02 -0800 (PST) Received: from localhost ([::1]:55791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCAmp-0006qt-VN for importer@patchew.org; Tue, 07 Nov 2017 15:47:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCAlu-0006TJ-O8 for qemu-devel@nongnu.org; Tue, 07 Nov 2017 15:46:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCAlt-0002zx-T1 for qemu-devel@nongnu.org; Tue, 07 Nov 2017 15:46:58 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:50367) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eCAlp-0002hf-B4; Tue, 07 Nov 2017 15:46:53 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 88BA420622; Tue, 7 Nov 2017 15:46:51 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 07 Nov 2017 15:46:51 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C10B24108; Tue, 7 Nov 2017 15:46:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=iGGxapvVTp90Y/Z2cbOsEc8/E+sxnfOLNGOgfhIX+PI=; b=SmmY5 9o+/Eco/iyr+6LZ5e3ApvlsNdxKoCxzO33yvJCX2hWCe+XTCak0FsW6kSelMMama 3RTooieqjHQ4Cea6G8tacdoDVE7EsUxVKA+DU0KRKfQ9vHWValu2Tfw3I5aZMWHC dbNAPAWUYsA0vIuude0Y/MAbpWd2e0GnmnZn6M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=iGGxapvVTp90Y/Z2cbOsEc8/E+sxn fOLNGOgfhIX+PI=; b=ccT0MHagY/buLJqBFR9KSF6IBZaleNDw0e/2uWphx13Vg hffiFZU39KreVl8sBf1Hh7RzMh5xjS5WIXRwz61L4oEMiAyb6y1vpXSd0EweKfDu 5/z+hA86Q/c2M5LQ9Dury8Xu/SMkF9HR4tSk3i9CRsyFUB2XDM/WXUXOhm9dRcL3 ubJPaFgYDM9dEEl+kpqI+dFiIYj+h3xVINXzGLpFbbyIUvRye8TvpA8CLWsBJo6h b/B3KrecVrEbZmPeNd5EVaHpH6rzAT8d/xr6PwGJzWhki7AeNMAUgggJKFwEDK5j UQNgwXjbEZLHgzcLGHDEYtrRZ9ovJ73VYjYcmaK8Q== X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Tue, 7 Nov 2017 15:46:51 -0500 Message-Id: <1510087611-1851-1-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 Subject: [Qemu-devel] [PATCH] arm/translate-a64: mark path as unreachable to eliminate warning 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: Peter Maydell , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Fixes the following warning when compiling with gcc 5.4.0 with -O1 optimizations and --enable-debug: target/arm/translate-a64.c: In function =E2=80=98aarch64_tr_translate_insn= =E2=80=99: target/arm/translate-a64.c:2361:8: error: =E2=80=98post_index=E2=80=99 may = be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] if (!post_index) { ^ target/arm/translate-a64.c:2307:10: note: =E2=80=98post_index=E2=80=99 was = declared here bool post_index; ^ target/arm/translate-a64.c:2386:8: error: =E2=80=98writeback=E2=80=99 may b= e used uninitialized in this function [-Werror=3Dmaybe-uninitialized] if (writeback) { ^ target/arm/translate-a64.c:2308:10: note: =E2=80=98writeback=E2=80=99 was d= eclared here bool writeback; ^ Note that idx comes from selecting 2 bits, and therefore its value can be at most 3. Signed-off-by: Emilio G. Cota Acked-by: Philippe Mathieu-Daud=C3=A9 Acked-by: does not necessarily indicate acknowledgement of the entire Acked-by: from one subsystem maintainer then this usually indicates Acked-by: is not as formal as Signed-off-by:. It is a record that the Acked-by: is often used by the maintainer of the affected code when that --- target/arm/translate-a64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index caca05a..625ef2d 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2340,28 +2340,30 @@ static void disas_ldst_reg_imm9(DisasContext *s, ui= nt32_t insn, switch (idx) { case 0: case 2: post_index =3D false; writeback =3D false; break; case 1: post_index =3D true; writeback =3D true; break; case 3: post_index =3D false; writeback =3D true; break; + default: + g_assert_not_reached(); } =20 if (rn =3D=3D 31) { gen_check_sp_alignment(s); } tcg_addr =3D read_cpu_reg_sp(s, rn, 1); =20 if (!post_index) { tcg_gen_addi_i64(tcg_addr, tcg_addr, imm9); } =20 if (is_vector) { if (is_store) { do_fp_st(s, rt, tcg_addr, size); --=20 2.7.4