From 0944e12232c165cef5a8cbc6d5921e11803c832f Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 16 May 2021 13:40:55 +0200 Subject: [PATCH] riscv: drop unused variable The array newly_halted[] is assigned but its value is never used. Drop it! Change-Id: I678812a31c45a3ec03716e3eee6a30b8e8947926 Signed-off-by: Antonio Borneo --- src/target/riscv/riscv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index a8838d904..d350e01bf 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2110,7 +2110,6 @@ int riscv_openocd_poll(struct target *target) if (target->smp) { unsigned halts_discovered = 0; - bool newly_halted[RISCV_MAX_HARTS] = {0}; unsigned should_remain_halted = 0; unsigned should_resume = 0; unsigned i = 0; @@ -2118,7 +2117,6 @@ int riscv_openocd_poll(struct target *target) list = list->next, i++) { struct target *t = list->target; riscv_info_t *r = riscv_info(t); - assert(i < DIM(newly_halted)); enum riscv_poll_hart out = riscv_poll_hart(t, r->current_hartid); switch (out) { case RPH_NO_CHANGE: @@ -2129,7 +2127,6 @@ int riscv_openocd_poll(struct target *target) break; case RPH_DISCOVERED_HALTED: halts_discovered++; - newly_halted[i] = true; t->state = TARGET_HALTED; enum riscv_halt_reason halt_reason = riscv_halt_reason(t, r->current_hartid);