From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 6277B385DC1A for ; Tue, 19 Dec 2023 10:52:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6277B385DC1A 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 6277B385DC1A 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=1702983145; cv=none; b=xlZ20+16VmHwxPSK+aCW0euzu85h7/MHcdDyAGBqABdSiF6A5IoI+F5rTTvDaH16/LwpsJYAVQ5wG+ekY/HuysLB4zQtvbpElBca4D7L8taZ6CCYHu01eCuKhBX1DmNKKDM8ZK7aUmg9O89NWDAAPcFxgJnO8DUjl7PScpHaKYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702983145; c=relaxed/simple; bh=tJJCyucpuCteJVF/IMHPDWM5eiZld1qltmlwM0+dU3Q=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=vv/P4U2QgUOfbc2go33cgnHMg+Q5Ub/JR71IJarO+KGU0loiNdeM7gcpgl1gvBG3DZnPDMBFeF8qNT7l/dtN7NeaC417X08rFR/fwSHFUXD6D9300cyzj+tyLlN0YZ5mT+0mbb5nAUWYKCuHRShumVO3bZN9BlEEPg4w39+GVkA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 0F239335DC5; Tue, 19 Dec 2023 10:52:23 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed 12/21] sim: lm32: fix -Wunused-variable warnings Date: Tue, 19 Dec 2023 05:51:46 -0500 Message-ID: <20231219105155.10433-12-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219105155.10433-1-vapier@gentoo.org> References: <20231219105155.10433-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.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,UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --- sim/lm32/dv-lm32cpu.c | 3 --- sim/lm32/dv-lm32timer.c | 1 - sim/lm32/dv-lm32uart.c | 1 - sim/lm32/traps.c | 11 +---------- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sim/lm32/dv-lm32cpu.c b/sim/lm32/dv-lm32cpu.c index 5f123e605c41..e8b3ce839715 100644 --- a/sim/lm32/dv-lm32cpu.c +++ b/sim/lm32/dv-lm32cpu.c @@ -143,8 +143,6 @@ deliver_lm32cpu_interrupt (struct hw *me, void *data) struct lm32cpu *controller = hw_data (me); SIM_DESC sd = hw_system (me); sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */ - address_word cia = CPU_PC_GET (cpu); - int interrupt = (uintptr_t) data; HW_TRACE ((me, "interrupt-check event")); @@ -198,7 +196,6 @@ lm32cpu_port_event (struct hw *me, struct lm32cpu *controller = hw_data (me); SIM_DESC sd = hw_system (me); sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */ - address_word cia = CPU_PC_GET (cpu); HW_TRACE ((me, "interrupt event on port %d, level %d", my_port, level)); diff --git a/sim/lm32/dv-lm32timer.c b/sim/lm32/dv-lm32timer.c index 0f823c041fe5..b22595017261 100644 --- a/sim/lm32/dv-lm32timer.c +++ b/sim/lm32/dv-lm32timer.c @@ -199,7 +199,6 @@ static void lm32timer_finish (struct hw *me) { struct lm32timer *timers; - int i; timers = HW_ZALLOC (me, struct lm32timer); set_hw_data (me, timers); diff --git a/sim/lm32/dv-lm32uart.c b/sim/lm32/dv-lm32uart.c index 99715825ca99..709102ac1e77 100644 --- a/sim/lm32/dv-lm32uart.c +++ b/sim/lm32/dv-lm32uart.c @@ -292,7 +292,6 @@ static void lm32uart_finish (struct hw *me) { struct lm32uart *uart; - int i; uart = HW_ZALLOC (me, struct lm32uart); set_hw_data (me, uart); diff --git a/sim/lm32/traps.c b/sim/lm32/traps.c index d07713add44f..18e26f0449be 100644 --- a/sim/lm32/traps.c +++ b/sim/lm32/traps.c @@ -48,7 +48,6 @@ USI lm32bf_divu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2) { SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); /* Check for divide by zero */ if (GET_H_GR (r1) == 0) @@ -76,7 +75,6 @@ USI lm32bf_modu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2) { SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); /* Check for divide by zero. */ if (GET_H_GR (r1) == 0) @@ -106,7 +104,7 @@ USI lm32bf_break_insn (SIM_CPU * current_cpu, IADDR pc) { SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); + /* Breakpoint. */ if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT) { @@ -130,7 +128,6 @@ USI lm32bf_scall_insn (SIM_CPU * current_cpu, IADDR pc) { SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); if ((STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT) || (GET_H_GR (8) == TARGET_NEWLIB_SYS_exit)) @@ -167,9 +164,6 @@ lm32bf_scall_insn (SIM_CPU * current_cpu, IADDR pc) USI lm32bf_b_insn (SIM_CPU * current_cpu, USI r0, USI f_r0) { - SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); - /* Restore interrupt enable. */ if (f_r0 == 30) SET_H_CSR (LM32_CSR_IE, (GET_H_CSR (LM32_CSR_IE) & 2) >> 1); @@ -183,9 +177,6 @@ lm32bf_b_insn (SIM_CPU * current_cpu, USI r0, USI f_r0) void lm32bf_wcsr_insn (SIM_CPU * current_cpu, USI f_csr, USI r1) { - SIM_DESC sd = CPU_STATE (current_cpu); - host_callback *cb = STATE_CALLBACK (sd); - /* Writing a 1 to IP CSR clears a bit, writing 0 has no effect. */ if (f_csr == LM32_CSR_IP) SET_H_CSR (f_csr, GET_H_CSR (f_csr) & ~r1); -- 2.43.0