From nobody Fri May 17 11:58:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695631565308901.4405554672612; Mon, 25 Sep 2023 01:46:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkhDH-0005j5-Nw; Mon, 25 Sep 2023 04:45:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhDG-0005ir-36 for qemu-devel@nongnu.org; Mon, 25 Sep 2023 04:45:06 -0400 Received: from mout.kundenserver.de ([217.72.192.73]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkhDE-0008T8-A1 for qemu-devel@nongnu.org; Mon, 25 Sep 2023 04:45:05 -0400 Received: from quad ([82.142.8.70]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MV6G0-1rCiUh32pS-00SB2c; Mon, 25 Sep 2023 10:44:57 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Cc: Markus Armbruster , Laurent Vivier Subject: [PATCH] disas/m68k: clean up local variable shadowing Date: Mon, 25 Sep 2023 10:44:55 +0200 Message-ID: <20230925084455.395150-1-laurent@vivier.eu> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:w9Xc5IXrQvt3haz2KTcSi1nxmxTQ0zQ15RLdOj87X4BkTdTOy4r wCXxJb17lNEOWDl5L9jcgdkSC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4yiT+OxeAiXK mS4AdsKJ5HWQpDw== 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: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1695631566581100001 Fix following warnings .../disas/m68k.c: In function =E2=80=98print_insn_arg=E2=80=99: .../disas/m68k.c:1635:13: warning: declaration of =E2=80=98val=E2=80=99 sha= dows a previous local [-Wshadow=3Dcompatible-local] 1635 | int val =3D fetch_arg (buffer, place, 5, info); | ^~~ .../disas/m68k.c:1093:7: note: shadowed declaration is here 1093 | int val =3D 0; | ^~~ Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- disas/m68k.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/disas/m68k.c b/disas/m68k.c index aefaecfbd6cb..1f16e295ab41 100644 --- a/disas/m68k.c +++ b/disas/m68k.c @@ -1632,10 +1632,10 @@ print_insn_arg (const char *d, case '2': case '3': { - int val =3D fetch_arg (buffer, place, 5, info); + int reg =3D fetch_arg (buffer, place, 5, info); const char *name =3D 0; =20 - switch (val) + switch (reg) { case 2: name =3D "%tt0"; break; case 3: name =3D "%tt1"; break; @@ -1655,12 +1655,12 @@ print_insn_arg (const char *d, int break_reg =3D ((buffer[3] >> 2) & 7); =20 (*info->fprintf_func) - (info->stream, val =3D=3D 0x1c ? "%%bad%d" : "%%bac%d", + (info->stream, reg =3D=3D 0x1c ? "%%bad%d" : "%%bac%d", break_reg); } break; default: - (*info->fprintf_func) (info->stream, "", val); + (*info->fprintf_func) (info->stream, "", reg); } if (name) (*info->fprintf_func) (info->stream, "%s", name); --=20 2.41.0