mirror of
https://github.com/openocd-org/openocd.git
synced 2025-10-14 02:58:23 +08:00
drivers: ch347: fix scan-build warnings
The newly merged driver ch347 triggers two new scan-build warnings
about dead assignment to variables.
Fix them.
Change-Id: Ided14272c3573be1498584e68ac4653cde029f31
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 7d0e125896
("jtag/drivers: Add support for CH347-based JTAG adapters")
Reviewed-on: https://review.openocd.org/c/openocd/+/9094
Tested-by: jenkins
Reviewed-by: Matthias Jentsch <info@easydevkits.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:

committed by
Tomas Vanek

parent
56d67dac2e
commit
96c219a408
@@ -863,7 +863,6 @@ static int ch347_single_read_get_byte(int read_buf_idx, uint8_t *byte)
|
||||
|
||||
if (read_buf_idx > CH347_SINGLE_CMD_MAX_READ || read_buf_idx < 0) {
|
||||
LOG_ERROR("read_buf_idx out of range");
|
||||
read_buf_idx = 0;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
@@ -989,7 +988,6 @@ static int ch347_scratchpad_add_stableclocks(int count)
|
||||
}
|
||||
|
||||
bool tms = ch347.tms_pin == TMS_H;
|
||||
retval = ERROR_OK;
|
||||
for (int i = 0; i < count; i++) {
|
||||
retval = ch347_scratchpad_add_clock_tms(tms);
|
||||
if (retval != ERROR_OK)
|
||||
|
Reference in New Issue
Block a user