diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-08-01 09:05:40 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-08-01 09:05:40 +0000 |
commit | 1596988d5336b79609a5efca3d200a4cf0d58829 (patch) | |
tree | f92b5b3c7c91f8b29e380cf18ca005258438470b /gas | |
parent | 8d8385cfb84fae7b0959b77fe287d97795415194 (diff) | |
download | gdb-1596988d5336b79609a5efca3d200a4cf0d58829.zip gdb-1596988d5336b79609a5efca3d200a4cf0d58829.tar.gz gdb-1596988d5336b79609a5efca3d200a4cf0d58829.tar.bz2 |
2011-08-01 Tristan Gingold <gingold@adacore.com>
* write.c (write_relocs): Fix -Wshadow in DEBUG3 and DEBUG4.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/write.c | 22 |
2 files changed, 15 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ee4d5e6..6af662a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2011-08-01 Tristan Gingold <gingold@adacore.com> + * write.c (write_relocs): Fix -Wshadow in DEBUG3 and DEBUG4. + +2011-08-01 Tristan Gingold <gingold@adacore.com> + * frags.c (frag_grow): Simplify the code. 2011-07-30 Richard Sandiford <rdsandiford@googlemail.com> diff --git a/gas/write.c b/gas/write.c index 1bd1a62..5eb4b56 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1233,15 +1233,15 @@ write_relocs (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) #ifdef DEBUG4 { - unsigned int i, j, nsyms; + unsigned int k, j, nsyms; asymbol **sympp; sympp = bfd_get_outsymbols (stdoutput); nsyms = bfd_get_symcount (stdoutput); - for (i = 0; i < n; i++) - if (((*relocs[i]->sym_ptr_ptr)->flags & BSF_SECTION_SYM) == 0) + for (k = 0; k < n; k++) + if (((*relocs[k]->sym_ptr_ptr)->flags & BSF_SECTION_SYM) == 0) { for (j = 0; j < nsyms; j++) - if (sympp[j] == *relocs[i]->sym_ptr_ptr) + if (sympp[j] == *relocs[k]->sym_ptr_ptr) break; if (j == nsyms) abort (); @@ -1280,16 +1280,16 @@ write_relocs (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) #ifdef DEBUG3 { - unsigned int i; - arelent *r; - asymbol *s; + unsigned int k; + fprintf (stderr, "relocs for sec %s\n", sec->name); - for (i = 0; i < n; i++) + for (k = 0; k < n; k++) { - r = relocs[i]; - s = *r->sym_ptr_ptr; + arelent *rel = relocs[k]; + asymbol *s = *rel->sym_ptr_ptr; fprintf (stderr, " reloc %2d @%p off %4lx : sym %-10s addend %lx\n", - i, r, (unsigned long)r->address, s->name, (unsigned long)r->addend); + k, rel, (unsigned long)rel->address, s->name, + (unsigned long)rel->addend); } } #endif |