From 327040ad745300c6c2117b81c584ff868567ef83 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 22 Sep 2021 19:14:29 +0200 Subject: [PATCH] target/lakemont: fix dead assignment Clang scan-build complains for a dead assignment: Value stored to 'tapstatus' is never read Remove the assignment and add a comment to point for a potential removal of the line. Change-Id: Iad2fdc7e6faf650e24cc086ee74c745acb0d1c73 Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/6591 Tested-by: jenkins --- src/target/lakemont.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target/lakemont.c b/src/target/lakemont.c index 576956e31..e46ee5cf8 100644 --- a/src/target/lakemont.c +++ b/src/target/lakemont.c @@ -1070,7 +1070,8 @@ int lakemont_step(struct target *t, int current, LOG_DEBUG("EFLAGS [TF] [RF] bits set=0x%08" PRIx32 ", PMCR=0x%08" PRIx32 ", EIP=0x%08" PRIx32, eflags, pmcr, eip); - tapstatus = get_tapstatus(t); + /* Returned value unused. Can this line be removed? */ + get_tapstatus(t); t->debug_reason = DBG_REASON_SINGLESTEP; t->state = TARGET_DEBUG_RUNNING;