aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpencer Oliver <spen@spen-soft.co.uk>2012-05-22 12:17:49 +0100
committerPeter Stuge <peter@stuge.se>2012-05-22 22:53:07 +0000
commit6b6e28ff02074b5e34733f83fcab90ae0e88381f (patch)
tree16ad38e8468ec503ea488f97bdd71bf0ae8e21f3 /src
parentb9085389982300529b43ce8abba505ed6ba833c6 (diff)
downloadriscv-openocd-6b6e28ff02074b5e34733f83fcab90ae0e88381f.zip
riscv-openocd-6b6e28ff02074b5e34733f83fcab90ae0e88381f.tar.gz
riscv-openocd-6b6e28ff02074b5e34733f83fcab90ae0e88381f.tar.bz2
jtag: remove opendous clang warnings
Change-Id: I0285c99507931e7d13aad36f4fc559c29a52faca Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/655 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/opendous.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/jtag/drivers/opendous.c b/src/jtag/drivers/opendous.c
index c973bd2..165bec6 100644
--- a/src/jtag/drivers/opendous.c
+++ b/src/jtag/drivers/opendous.c
@@ -557,23 +557,25 @@ void opendous_tap_append_scan(int length, uint8_t *buffer, struct scan_command *
* For the purpose of padding we assume that we are in idle or pause state. */
int opendous_tap_execute(void)
{
- int byte_length, byte_length_out;
+ int byte_length;
int i, j;
int result;
- int output_counter;
+
+#ifdef _DEBUG_USB_COMMS_
+ int byte_length_out;
+#endif
if (tap_length > 0) {
/* memset(tdo_buffer,0,OPENDOUS_TAP_BUFFER_SIZE); */
/* LOG_INFO("OPENDOUS tap execute %d",tap_length); */
byte_length = (tap_length + 3) / 4;
- byte_length_out = (tap_length + 7) / 8;
#ifdef _DEBUG_USB_COMMS_
+ byte_length_out = (tap_length + 7) / 8;
LOG_DEBUG("opendous is sending %d bytes", byte_length);
#endif
- output_counter = 0;
for (j = 0, i = 0; j < byte_length;) {
int recieve;
@@ -601,10 +603,9 @@ int opendous_tap_execute(void)
j += transmit;
}
- result = byte_length_out;
#ifdef _DEBUG_USB_COMMS_
- LOG_DEBUG("opendous tap result %d", result);
- opendous_debug_buffer(tdo_buffer, result);
+ LOG_DEBUG("opendous tap result %d", byte_length_out);
+ opendous_debug_buffer(tdo_buffer, byte_length_out);
#endif
/* LOG_INFO("eStick tap execute %d",tap_length); */