]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: lm32: fix -Wunused-variable warnings
authorMike Frysinger <vapier@gentoo.org>
Sat, 16 Dec 2023 03:10:00 +0000 (22:10 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 19 Dec 2023 10:51:10 +0000 (05:51 -0500)
sim/lm32/dv-lm32cpu.c
sim/lm32/dv-lm32timer.c
sim/lm32/dv-lm32uart.c
sim/lm32/traps.c

index 5f123e605c413638841541647118c55e1dd4ba7a..e8b3ce839715724af97246863decbee5165b33d3 100644 (file)
@@ -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));
index 0f823c041fe5056b9791b8ecaaf9a1c353f21461..b22595017261d9aedf5f735a4abe8de9bfdfecc7 100644 (file)
@@ -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);
index 99715825ca99de5a8a3be568fb0c5bf5bb3dd9d6..709102ac1e77f3e8c515ebd1ab4c8662a1e9862f 100644 (file)
@@ -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);
index d07713add44f49747bfd4190c6f0d7e2a8c217f3..18e26f0449be8a4b781a4e3df83437fa8272e1fa 100644 (file)
@@ -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);