diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2019-12-20 23:33:55 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-03-07 15:29:24 +0000 |
commit | b07604cc6aacc5591afd281e0d65ab27280f19b4 (patch) | |
tree | b147fb79c0b7749f6c80cdd2c4237acf8621b14a | |
parent | 6ff852e415fe4ffaab793e5f4fe6f68e3e7fa452 (diff) | |
download | riscv-openocd-b07604cc6aacc5591afd281e0d65ab27280f19b4.zip riscv-openocd-b07604cc6aacc5591afd281e0d65ab27280f19b4.tar.gz riscv-openocd-b07604cc6aacc5591afd281e0d65ab27280f19b4.tar.bz2 |
jtag/drivers/openjtag: fix clang static analyzer warnings
Change-Id: I900ce8157b3e220a4647871080bb9abc772446d1
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5369
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
-rw-r--r-- | src/jtag/drivers/openjtag.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jtag/drivers/openjtag.c b/src/jtag/drivers/openjtag.c index 7b07813..6131df9 100644 --- a/src/jtag/drivers/openjtag.c +++ b/src/jtag/drivers/openjtag.c @@ -229,7 +229,7 @@ static int openjtag_buf_write_standard( return ERROR_JTAG_DEVICE_ERROR; } - *bytes_written += retval; + *bytes_written = retval; return ERROR_OK; } @@ -652,7 +652,6 @@ static void openjtag_add_scan(uint8_t *buffer, int length, struct scan_command * /* whole byte */ /* bits to transfer */ - bits = 7; command |= (7 << 5); length -= 8; } @@ -690,7 +689,7 @@ static void openjtag_execute_sleep(struct jtag_command *cmd) static void openjtag_set_state(uint8_t openocd_state) { - int8_t state = openjtag_get_tap_state(openocd_state); + uint8_t state = openjtag_get_tap_state(openocd_state); uint8_t buf = 0; buf = 0x01; |