summaryrefslogtreecommitdiff
path: root/src/svf
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-06-16 08:17:27 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-16 08:17:27 +0200
commit9bbbbdc0bd244b09f846b1acdf28327da2a166d8 (patch)
treec42fc25c9da689249acb9a064e72bdc3c7db9187 /src/svf
parentf4958d61ef4188ed02629968d21c3a4de3a89121 (diff)
downloadopenocd+libswd-9bbbbdc0bd244b09f846b1acdf28327da2a166d8.tar.gz
openocd+libswd-9bbbbdc0bd244b09f846b1acdf28327da2a166d8.tar.bz2
openocd+libswd-9bbbbdc0bd244b09f846b1acdf28327da2a166d8.tar.xz
openocd+libswd-9bbbbdc0bd244b09f846b1acdf28327da2a166d8.zip
svf: -Wshadow warning fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/svf')
-rw-r--r--src/svf/svf.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/svf/svf.c b/src/svf/svf.c
index 6e951e24..62e23248 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -272,7 +272,7 @@ static unsigned svf_get_mask_u32(int bitlen)
int svf_add_statemove(tap_state_t state_to)
{
tap_state_t state_from = cmd_queue_cur_state;
- uint8_t index;
+ unsigned index_var;
/* when resetting, be paranoid and ignore current state */
if (state_to == TAP_RESET) {
@@ -280,18 +280,18 @@ int svf_add_statemove(tap_state_t state_to)
return ERROR_OK;
}
- for (index = 0; index < ARRAY_SIZE(svf_statemoves); index++)
+ for (index_var = 0; index_var < ARRAY_SIZE(svf_statemoves); index_var++)
{
- if ((svf_statemoves[index].from == state_from)
- && (svf_statemoves[index].to == state_to))
+ if ((svf_statemoves[index_var].from == state_from)
+ && (svf_statemoves[index_var].to == state_to))
{
/* recorded path includes current state ... avoid extra TCKs! */
- if (svf_statemoves[index].num_of_moves > 1)
- jtag_add_pathmove(svf_statemoves[index].num_of_moves - 1,
- svf_statemoves[index].paths + 1);
+ if (svf_statemoves[index_var].num_of_moves > 1)
+ jtag_add_pathmove(svf_statemoves[index_var].num_of_moves - 1,
+ svf_statemoves[index_var].paths + 1);
else
- jtag_add_pathmove(svf_statemoves[index].num_of_moves,
- svf_statemoves[index].paths);
+ jtag_add_pathmove(svf_statemoves[index_var].num_of_moves,
+ svf_statemoves[index_var].paths);
return ERROR_OK;
}
}
@@ -723,22 +723,22 @@ static int svf_copy_hexstring_to_binary(char *str, uint8_t **bin, int orig_bit_l
static int svf_check_tdo(void)
{
- int i, len, index;
+ int i, len, index_var;
for (i = 0; i < svf_check_tdo_para_index; i++)
{
- index = svf_check_tdo_para[i].buffer_offset;
+ index_var = svf_check_tdo_para[i].buffer_offset;
len = svf_check_tdo_para[i].bit_len;
if ((svf_check_tdo_para[i].enabled)
- && buf_cmp_mask(&svf_tdi_buffer[index], &svf_tdo_buffer[index], &svf_mask_buffer[index], len))
+ && buf_cmp_mask(&svf_tdi_buffer[index_var], &svf_tdo_buffer[index_var], &svf_mask_buffer[index_var], len))
{
unsigned bitmask;
unsigned received, expected, tapmask;
bitmask = svf_get_mask_u32(svf_check_tdo_para[i].bit_len);
- memcpy(&received, svf_tdi_buffer + index, sizeof(unsigned));
- memcpy(&expected, svf_tdo_buffer + index, sizeof(unsigned));
- memcpy(&tapmask, svf_mask_buffer + index, sizeof(unsigned));
+ memcpy(&received, svf_tdi_buffer + index_var, sizeof(unsigned));
+ memcpy(&expected, svf_tdo_buffer + index_var, sizeof(unsigned));
+ memcpy(&tapmask, svf_mask_buffer + index_var, sizeof(unsigned));
LOG_ERROR("tdo check error at line %d",
svf_check_tdo_para[i].line_num);
LOG_ERROR("read = 0x%X, want = 0x%X, mask = 0x%X",