OSDN Git Service

Prefix variables defined in INIT_GOT define for AVR32 arch
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Mon, 3 Nov 2008 15:54:24 +0000 (15:54 -0000)
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Mon, 3 Nov 2008 15:54:24 +0000 (15:54 -0000)
This patch will prefix the i and nr_got variable with an underscore to seperate
them from any variables already present in the functions where the macro is
used.

Needed to silence compiler warnings.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
ldso/ldso/avr32/dl-sysdep.h

index 0d20e9e..6696382 100644 (file)
 /* Initialization sequence for the application/library GOT. */
 #define INIT_GOT(GOT_BASE,MODULE)                                      \
        do {                                                            \
-               unsigned long i, nr_got;                                \
+               unsigned long _i, _nr_got;                              \
                                                                        \
                GOT_BASE[0] = (unsigned long) _dl_linux_resolve;        \
                GOT_BASE[1] = (unsigned long) MODULE;                   \
                                                                        \
                /* Add load address displacement to all GOT entries */  \
-               nr_got = MODULE->dynamic_info[DT_AVR32_GOTSZ_IDX] / 4;  \
-               for (i = 2; i < nr_got; i++)                            \
-                       GOT_BASE[i] += (unsigned long)MODULE->loadaddr; \
+               _nr_got = MODULE->dynamic_info[DT_AVR32_GOTSZ_IDX] / 4; \
+               for (_i = 2; _i < _nr_got; _i++)                                \
+                       GOT_BASE[_i] += (unsigned long)MODULE->loadaddr;        \
        } while (0)
 
 #define do_rem(result, n, base)        ((result) = (n) % (base))