From: kc8apf Date: Wed, 20 May 2009 04:53:00 +0000 (+0000) Subject: Author: Michael Bruck X-Git-Tag: v0.2.0~664 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=645bde6e57697dda2bb35c9441af09bcb3e29513;p=openocd Author: Michael Bruck - move scan_size in interface_jtag_add_dr_scan() into the scope of the inner loop and change it to unsigned git-svn-id: svn://svn.berlios.de/openocd/trunk@1846 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 066031db..3da409c4 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -791,7 +791,6 @@ int MINIDRIVER(interface_jtag_add_dr_scan)(int in_num_fields, scan_field_t *in_f int nth_tap; int bypass_devices = 0; int field_count = 0; - int scan_size; jtag_tap_t *tap; @@ -837,7 +836,7 @@ int MINIDRIVER(interface_jtag_add_dr_scan)(int in_num_fields, scan_field_t *in_f if (tap == in_fields[j].tap) { found = 1; - scan_size = in_fields[j].num_bits; + size_t scan_size = in_fields[j].num_bits; scan->fields[field_count].num_bits = scan_size; scan->fields[field_count].out_value = buf_cpy(in_fields[j].out_value, cmd_queue_alloc(CEIL(scan_size, 8)), scan_size); scan->fields[field_count].in_value = in_fields[j].in_value;