summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2010-06-19 11:12:12 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-19 11:37:20 +0200
commitacee9d1c65bd97bbd5aa2b633e2455e87edbe836 (patch)
tree4b10f4fa5d11bfdf3e5104b8ba3dfa80bf0993d9 /src
parent2a25c968bf4ffec39ee76da0a164e46bd4215134 (diff)
downloadopenocd_libswd-acee9d1c65bd97bbd5aa2b633e2455e87edbe836.tar.gz
openocd_libswd-acee9d1c65bd97bbd5aa2b633e2455e87edbe836.tar.bz2
openocd_libswd-acee9d1c65bd97bbd5aa2b633e2455e87edbe836.tar.xz
openocd_libswd-acee9d1c65bd97bbd5aa2b633e2455e87edbe836.zip
arm-jtag-ew: -Wshadow fix
declaration of ‘index’ shadows a global declaration in /usr/include/string.h Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/arm-jtag-ew.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jtag/drivers/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c
index 7a6c1789..72c756e8 100644
--- a/src/jtag/drivers/arm-jtag-ew.c
+++ b/src/jtag/drivers/arm-jtag-ew.c
@@ -568,29 +568,29 @@ static void armjtagew_tap_ensure_space(int scans, int bits)
static void armjtagew_tap_append_step(int tms, int tdi)
{
last_tms = tms;
- int index = tap_length / 8;
+ int index_local = tap_length / 8;
- if (index < ARMJTAGEW_TAP_BUFFER_SIZE)
+ if (index_local < ARMJTAGEW_TAP_BUFFER_SIZE)
{
int bit_index = tap_length % 8;
uint8_t bit = 1 << bit_index;
if (tms)
{
- tms_buffer[index] |= bit;
+ tms_buffer[index_local] |= bit;
}
else
{
- tms_buffer[index] &= ~bit;
+ tms_buffer[index_local] &= ~bit;
}
if (tdi)
{
- tdi_buffer[index] |= bit;
+ tdi_buffer[index_local] |= bit;
}
else
{
- tdi_buffer[index] &= ~bit;
+ tdi_buffer[index_local] &= ~bit;
}
tap_length++;