]> git.sur5r.net Git - openocd/commitdiff
jlink: fix -Wshadow warning
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 17 Jun 2010 15:13:08 +0000 (23:13 +0800)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 17 Jun 2010 16:14:20 +0000 (18:14 +0200)
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/drivers/jlink.c

index 34fce38880e2ee5011d266ce263e31fafb349672..52f12b4378a12071354b7cc530494c72b269780d 100644 (file)
@@ -712,9 +712,9 @@ static void jlink_tap_ensure_space(int scans, int bits)
 
 static void jlink_tap_append_step(int tms, int tdi)
 {
-       int index = tap_length / 8;
+       int index_var = tap_length / 8;
 
-       if (index >= JLINK_TAP_BUFFER_SIZE)
+       if (index_var >= JLINK_TAP_BUFFER_SIZE)
        {
                LOG_ERROR("jlink_tap_append_step: overflow");
                *(uint32_t *)0xFFFFFFFF = 0;
@@ -727,18 +727,18 @@ static void jlink_tap_append_step(int tms, int tdi)
        // we do not pad TMS, so be sure to initialize all bits
        if (0 == bit_index)
        {
-               tms_buffer[index] = tdi_buffer[index] = 0;
+               tms_buffer[index_var] = tdi_buffer[index_var] = 0;
        }
 
        if (tms)
-               tms_buffer[index] |= bit;
+               tms_buffer[index_var] |= bit;
        else
-               tms_buffer[index] &= ~bit;
+               tms_buffer[index_var] &= ~bit;
 
        if (tdi)
-               tdi_buffer[index] |= bit;
+               tdi_buffer[index_var] |= bit;
        else
-               tdi_buffer[index] &= ~bit;
+               tdi_buffer[index_var] &= ~bit;
 
        tap_length++;
 }