From nobody Wed Apr 9 20:43:41 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 Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510582405407725.0785726182937; Mon, 13 Nov 2017 06:13:25 -0800 (PST) Received: from localhost ([::1]:54612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEFUB-00060k-Sc for importer@patchew.org; Mon, 13 Nov 2017 09:13:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEFSO-0004CQ-5o for qemu-devel@nongnu.org; Mon, 13 Nov 2017 09:11:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEFSI-0007kj-H1 for qemu-devel@nongnu.org; Mon, 13 Nov 2017 09:11:24 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:38322) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEFSI-0007Yd-A7 for qemu-devel@nongnu.org; Mon, 13 Nov 2017 09:11:18 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eEFS3-00021y-0W for qemu-devel@nongnu.org; Mon, 13 Nov 2017 14:11:03 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 13 Nov 2017 14:11:36 +0000 Message-Id: <1510582304-27058-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510582304-27058-1-git-send-email-peter.maydell@linaro.org> References: <1510582304-27058-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 1/9] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: "Emilio G. Cota" 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 Message-id: 1510087611-1851-1-git-send-email-cota@braap.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- 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 @@ -2351,6 +2351,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint= 32_t insn, post_index =3D false; writeback =3D true; break; + default: + g_assert_not_reached(); } =20 if (rn =3D=3D 31) { --=20 2.7.4