From patchwork Fri Dec 22 01:23:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82728 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 48D3A3860015 for ; Fri, 22 Dec 2023 01:25:27 +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 AAFF038618AB for ; Fri, 22 Dec 2023 01:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAFF038618AB 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 AAFF038618AB 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=1703208252; cv=none; b=JXH7EjNHpZ3aUfjsLrnTZw4zTleljisaFS5jDrx6b5DizmkmptpRL6PRGT58hBpgv2snBJMxOOksO0RpNcbh/7cM5v1uRYNPhAJzfPG0HwPkfT/Zej6hOmeuo0RPqTO7nme/bwDyvwNGECKJAHIjKSFCuXvG41wTIW1yiWKIFxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703208252; c=relaxed/simple; bh=X7cKHQn4O0wOqdn6+l7icKlFCsfJWWM3sgzopEbQUnE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=v4RGlieEFwccsLXNQWtfu2ImMLF/RjyAZTW/Y+eku9KeWdX2QCwez9ViRZL10gjh5Hz4KsXZ+JbMmJGJgoA7nr8hGR7wjJMZxBf6gyDmNTtvxjMRz/9jh2QP6y3LWwyJSYmbYuLv+ayQS2qJvh0iBSOBSrUVRjnWrbt95WEpL38= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 5B119340943; Fri, 22 Dec 2023 01:24:10 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 07/15] sim: frv: fix -Wshadow=local warnings Date: Thu, 21 Dec 2023 20:23:47 -0500 Message-ID: <20231222012355.7504-7-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 redundant decls, and rename conflicting vars. --- sim/frv/interrupts.c | 1 - sim/frv/options.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sim/frv/interrupts.c b/sim/frv/interrupts.c index 979360738bab..8faab5fe0db9 100644 --- a/sim/frv/interrupts.c +++ b/sim/frv/interrupts.c @@ -887,7 +887,6 @@ set_exception_status_registers ( break; default: { - SIM_DESC sd = CPU_STATE (current_cpu); IADDR pc = CPU_PC_GET (current_cpu); sim_engine_abort (sd, current_cpu, pc, "invalid non-strict program interrupt kind: %d\n", diff --git a/sim/frv/options.c b/sim/frv/options.c index cb1729b9c403..d6425002901f 100644 --- a/sim/frv/options.c +++ b/sim/frv/options.c @@ -212,9 +212,9 @@ frv_option_handler (SIM_DESC sd, sim_cpu *current_cpu, int opt, } for (i = 0; i < MAX_NR_PROCESSORS; ++i) { - SIM_CPU *current_cpu = STATE_CPU (sd, i); - FRV_CACHE *insn_cache = CPU_INSN_CACHE (current_cpu); - FRV_CACHE *data_cache = CPU_DATA_CACHE (current_cpu); + SIM_CPU *cpu = STATE_CPU (sd, i); + FRV_CACHE *insn_cache = CPU_INSN_CACHE (cpu); + FRV_CACHE *data_cache = CPU_DATA_CACHE (cpu); insn_cache->memory_latency = cycles; data_cache->memory_latency = cycles; }