2009-12-11 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Fri, 11 Dec 2009 15:42:38 +0000 (15:42 +0000)
committerTristan Gingold <gingold@adacore.com>
Fri, 11 Dec 2009 15:42:38 +0000 (15:42 +0000)
* som.c (bfd_som_set_subsection_attributes)
(bfd_section_from_som_symbol, som_reloc_queue_fix): Fix shadowed
variable warnings.
* cache.c (close_one): Likewise.

bfd/ChangeLog
bfd/cache.c
bfd/som.c

index d11f19073c3ac0125ede183d1dd1ab50ccd0f950..0d2cfdd3a24f939ec8bfebfd82071fad15667330 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-11  Tristan Gingold  <gingold@adacore.com>
+
+       * som.c (bfd_som_set_subsection_attributes) 
+       (bfd_section_from_som_symbol, som_reloc_queue_fix): Fix shadowed
+       variable warnings.
+       * cache.c (close_one): Likewise.
+
 2009-12-11  Nick Clifton  <nickc@redhat.com>
 
        * warning.m4 (GCC_WARN_CFLAGS): Add -Wshadow.
index cf1869d0ed5c1139a67f78d9195b1034b58e80eb..2239c28aac44f357b83e685e91e0605b79e785de 100644 (file)
@@ -144,33 +144,33 @@ bfd_cache_delete (bfd *abfd)
 static bfd_boolean
 close_one (void)
 {
-  register bfd *kill;
+  register bfd *to_kill;
 
   if (bfd_last_cache == NULL)
-    kill = NULL;
+    to_kill = NULL;
   else
     {
-      for (kill = bfd_last_cache->lru_prev;
-          ! kill->cacheable;
-          kill = kill->lru_prev)
+      for (to_kill = bfd_last_cache->lru_prev;
+          ! to_kill->cacheable;
+          to_kill = to_kill->lru_prev)
        {
-         if (kill == bfd_last_cache)
+         if (to_kill == bfd_last_cache)
            {
-             kill = NULL;
+             to_kill = NULL;
              break;
            }
        }
     }
 
-  if (kill == NULL)
+  if (to_kill == NULL)
     {
       /* There are no open cacheable BFD's.  */
       return TRUE;
     }
 
-  kill->where = real_ftell ((FILE *) kill->iostream);
+  to_kill->where = real_ftell ((FILE *) to_kill->iostream);
 
-  return bfd_cache_delete (kill);
+  return bfd_cache_delete (to_kill);
 }
 
 /* Check to see if the required BFD is the same as the last one
index f259da805508016b19900e438cbc80795e143208..7a034b11084ebd62b94b2f58936b18d52c4af3f4 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -982,12 +982,12 @@ som_reloc_queue_insert (unsigned char *p,
    to the front of the queue.  */
 
 static void
-som_reloc_queue_fix (struct reloc_queue *queue, unsigned int index)
+som_reloc_queue_fix (struct reloc_queue *queue, unsigned int idx)
 {
-  if (index == 0)
+  if (idx == 0)
     return;
 
-  if (index == 1)
+  if (idx == 1)
     {
       unsigned char *tmp1 = queue[0].reloc;
       unsigned int tmp2 = queue[0].size;
@@ -999,7 +999,7 @@ som_reloc_queue_fix (struct reloc_queue *queue, unsigned int index)
       return;
     }
 
-  if (index == 2)
+  if (idx == 2)
     {
       unsigned char *tmp1 = queue[0].reloc;
       unsigned int tmp2 = queue[0].size;
@@ -1013,7 +1013,7 @@ som_reloc_queue_fix (struct reloc_queue *queue, unsigned int index)
       return;
     }
 
-  if (index == 3)
+  if (idx == 3)
     {
       unsigned char *tmp1 = queue[0].reloc;
       unsigned int tmp2 = queue[0].size;
@@ -4239,10 +4239,10 @@ bfd_section_from_som_symbol (bfd *abfd, struct symbol_dictionary_record *symbol)
          && symbol->symbol_type != ST_SEC_PROG
          && symbol->symbol_type != ST_MILLICODE))
     {
-      int index = symbol->symbol_info;
+      int idx = symbol->symbol_info;
 
       for (section = abfd->sections; section != NULL; section = section->next)
-       if (section->target_index == index && som_is_subspace (section))
+       if (section->target_index == idx && som_is_subspace (section))
          return section;
     }
   else
@@ -5177,7 +5177,7 @@ bfd_som_set_section_attributes (asection *section,
 bfd_boolean
 bfd_som_set_subsection_attributes (asection *section,
                                   asection *container,
-                                  int access,
+                                  int access_ctr,
                                   unsigned int sort_key,
                                   int quadrant,
                                   int comdat,
@@ -5194,7 +5194,7 @@ bfd_som_set_subsection_attributes (asection *section,
        return FALSE;
     }
   som_section_data (section)->copy_data->sort_key = sort_key;
-  som_section_data (section)->copy_data->access_control_bits = access;
+  som_section_data (section)->copy_data->access_control_bits = access_ctr;
   som_section_data (section)->copy_data->quadrant = quadrant;
   som_section_data (section)->copy_data->container = container;
   som_section_data (section)->copy_data->is_comdat = comdat;