From: OpenOCD-Gerrit <ope...@us...> - 2021-10-25 16:10:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 8f1971295b251dc13b687db493c2daa7f922e940 (commit) via 327040ad745300c6c2117b81c584ff868567ef83 (commit) from 01de751025cfaebb7c1090f1d1ff00071ce39c71 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8f1971295b251dc13b687db493c2daa7f922e940 Author: Antonio Borneo <bor...@gm...> Date: Wed Sep 22 19:21:39 2021 +0200 mips64_pracc: fix three dead assignments Clang scan-build complains for three dead assignments: Although the value stored to 'data' is used in the enclosing expression, the value is never actually read from 'data' Value stored to 'address' is never read Remove the useless assignment and the variable 'data'. Change-Id: Ie8dcb74b1c1aa5eea1acd06b3c45c5b44954c9e7 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/6592 Tested-by: jenkins diff --git a/src/target/mips64_pracc.c b/src/target/mips64_pracc.c index 9583ad767..bb2af228d 100644 --- a/src/target/mips64_pracc.c +++ b/src/target/mips64_pracc.c @@ -213,7 +213,7 @@ int mips64_pracc_exec(struct mips_ejtag *ejtag_info, unsigned num_param_out, uint64_t *param_out) { uint32_t ejtag_ctrl; - uint64_t address = 0, address_prev = 0, data; + uint64_t address = 0, address_prev = 0; struct mips64_pracc_context ctx; int retval; int pass = 0; @@ -243,7 +243,7 @@ int mips64_pracc_exec(struct mips_ejtag *ejtag_info, address_prev = address; else address_prev = 0; - address32 = data = 0; + address32 = 0; mips_ejtag_set_instr(ejtag_info, EJTAG_INST_ADDRESS); mips_ejtag_drscan_32(ejtag_info, &address32); @@ -1358,8 +1358,6 @@ int mips64_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, 0, NULL, 0, NULL); /* next fetch to dmseg should be in FASTDATA_AREA, check */ - address = 0; - mips_ejtag_set_instr(ejtag_info, EJTAG_INST_ADDRESS); retval = mips_ejtag_drscan_32(ejtag_info, &address32); if (retval != ERROR_OK) @@ -1411,7 +1409,6 @@ int mips64_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, return retval; } - address = 0; mips_ejtag_set_instr(ejtag_info, EJTAG_INST_ADDRESS); retval = mips_ejtag_drscan_32(ejtag_info, &address32); if (retval != ERROR_OK) { commit 327040ad745300c6c2117b81c584ff868567ef83 Author: Antonio Borneo <bor...@gm...> Date: Wed Sep 22 19:14:29 2021 +0200 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 <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/6591 Tested-by: jenkins 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; ----------------------------------------------------------------------- Summary of changes: src/target/lakemont.c | 3 ++- src/target/mips64_pracc.c | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |