Simple -Wshadow=local fixes
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index 4bffd2048c3117b654d4207fa192fd16c74361ed..a9b8fa7c582f74d2548dc84d4b642afb726dd770 100644 (file)
@@ -773,15 +773,13 @@ static int
 objfile_relocate1 (struct objfile *objfile, 
                   const struct section_offsets *new_offsets)
 {
-  struct obj_section *s;
   struct section_offsets *delta =
     ((struct section_offsets *) 
      alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
 
-  int i;
   int something_changed = 0;
 
-  for (i = 0; i < objfile->num_sections; ++i)
+  for (int i = 0; i < objfile->num_sections; ++i)
     {
       delta->offsets[i] =
        ANOFFSET (new_offsets, i) - ANOFFSET (objfile->section_offsets, i);
@@ -799,13 +797,12 @@ objfile_relocate1 (struct objfile *objfile,
     ALL_OBJFILE_FILETABS (objfile, cust, s)
     {
       struct linetable *l;
-      int i;
 
       /* First the line table.  */
       l = SYMTAB_LINETABLE (s);
       if (l)
        {
-         for (i = 0; i < l->nitems; ++i)
+         for (int i = 0; i < l->nitems; ++i)
            l->item[i].pc += ANOFFSET (delta,
                                       COMPUNIT_BLOCK_LINE_SECTION
                                         (cust));
@@ -821,7 +818,7 @@ objfile_relocate1 (struct objfile *objfile,
        addrmap_relocate (BLOCKVECTOR_MAP (bv),
                          ANOFFSET (delta, block_line_section));
 
-      for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); ++i)
+      for (int i = 0; i < BLOCKVECTOR_NBLOCKS (bv); ++i)
        {
          struct block *b;
          struct symbol *sym;
@@ -872,6 +869,7 @@ objfile_relocate1 (struct objfile *objfile,
   get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1;
 
   /* Update the table in exec_ops, used to read memory.  */
+  struct obj_section *s;
   ALL_OBJFILE_OSECTIONS (objfile, s)
     {
       int idx = s - objfile->sections;
This page took 0.050547 seconds and 4 git commands to generate.