From patchwork Fri Dec 22 01:23:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82717 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACDC23858420 for ; Fri, 22 Dec 2023 01:24:34 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D21C03858420 for ; Fri, 22 Dec 2023 01:24:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D21C03858420 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D21C03858420 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703208254; cv=none; b=HiJg4tPeUbDQtOaookJjoiX94dOwJ04ETXOOmaekPfog9RX72ftKFLP6/7/p2J05qgVRs88Ey/8ze1Iqrf03pRp0XzyTRXn+7Ps6cEKczB8jksWbJxkw70jrCvZoZvUwwxuBlFTf2M7nC6FBX9XYo5hvxLrOOsCpdhNvEbCF/ss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703208254; c=relaxed/simple; bh=1D3mTvpzdYr3mujeEc5y18eSZVFYEXs60BA3Lcd+T6g=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IgxKbhwwH8dVfNEGuKruSWuIA4CgLJnra4vDyZ/fIgzu/BDEPfm8SJ1lMs6KKAy9NZyENE+nISpFYOt6IoAbt6Qri4hHYPMTzMXAV5JLAFQSetz6nebKPxmcDl7waHq6awXJXWAwX3Mgc/0IdJMUky3QnG/3OotpK2Cm5YsfANA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 6D6EC340BEF; Fri, 22 Dec 2023 01:24:12 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 08/15] sim: h8300: fix -Wshadow=local warnings Date: Thu, 21 Dec 2023 20:23:48 -0500 Message-ID: <20231222012355.7504-8-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222012355.7504-1-vapier@gentoo.org> References: <20231222012355.7504-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Delete conflicting decls when the existing scope has vars of the same name & type for this exact use. --- sim/h8300/compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 8ae7757ee1b1..cfa6eeead5c1 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -1738,7 +1738,7 @@ init_pointers (SIM_DESC sd) #define OBITOP(name, f, s, op) \ case O (name, SB): \ { \ - int m, tmp; \ + int m; \ \ if (f) \ if (fetch (sd, &code->dst, &ea)) \ @@ -4770,7 +4770,7 @@ sim_open (SIM_OPEN_KIND kind, /* CPU specific initialization. */ for (i = 0; i < MAX_NR_PROCESSORS; ++i) { - SIM_CPU *cpu = STATE_CPU (sd, i); + cpu = STATE_CPU (sd, i); CPU_REG_FETCH (cpu) = h8300_reg_fetch; CPU_REG_STORE (cpu) = h8300_reg_store;