OSDN Git Service

* elflink.c (compute_bucket_count): Warning fixes.
authorAlan Modra <amodra@bigpond.net.au>
Thu, 14 Feb 2008 08:31:47 +0000 (08:31 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Thu, 14 Feb 2008 08:31:47 +0000 (08:31 +0000)
bfd/ChangeLog
bfd/elflink.c

index a8d88bd..d537146 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (compute_bucket_count): Warning fixes.
+
 2008-02-12  DJ Delorie  <dj@redhat.com>
 
        * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
index c658b14..a0bd0df 100644 (file)
@@ -5234,13 +5234,13 @@ static const size_t elf_buckets[] =
    Therefore the result is always a good payoff between few collisions
    (= short chain lengths) and table size.  */
 static size_t
-compute_bucket_count (struct bfd_link_info *info, unsigned long int *hashcodes,
-                     unsigned long int nsyms, int gnu_hash)
+compute_bucket_count (struct bfd_link_info *info,
+                     unsigned long int *hashcodes ATTRIBUTE_UNUSED,
+                     unsigned long int nsyms,
+                     int gnu_hash)
 {
-  size_t dynsymcount = elf_hash_table (info)->dynsymcount;
   size_t best_size = 0;
   unsigned long int i;
-  bfd_size_type amt;
 
   /* We have a problem here.  The following code to optimize the table
      size requires an integer type with more the 32 bits.  If
@@ -5252,8 +5252,10 @@ compute_bucket_count (struct bfd_link_info *info, unsigned long int *hashcodes,
       size_t maxsize;
       BFD_HOST_U_64_BIT best_chlen = ~((BFD_HOST_U_64_BIT) 0);
       bfd *dynobj = elf_hash_table (info)->dynobj;
+      size_t dynsymcount = elf_hash_table (info)->dynsymcount;
       const struct elf_backend_data *bed = get_elf_backend_data (dynobj);
       unsigned long int *counts;
+      bfd_size_type amt;
 
       /* Possible optimization parameters: if we have NSYMS symbols we say
         that the hashing table must at least have NSYMS/4 and at most