This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compilation failed


On Wed, Feb 13, 2008 at 10:11:16PM +0100, Paluch Sebastian wrote:
> /tmp/src/binutils-2.18/bfd/elflink.c: In function `compute_bucket_count':
> /tmp/src/binutils-2.18/bfd/elflink.c:5177: warning: unused variable  
> `dynsymcount'
> /tmp/src/binutils-2.18/bfd/elflink.c:5180: warning: unused variable `amt'
> /tmp/src/binutils-2.18/bfd/elflink.c: At top level:
> /tmp/src/binutils-2.18/bfd/elflink.c:5174: warning: unused parameter  
> 'hashcodes'

Thanks.  I wonder how you managed to you managed to have
BFD_HOST_U_64_BIT undefined, since you seem to be using gcc?  In any
case, the warnings should be fixed.

	* elflink.c (compute_bucket_count): Warning fixes.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.294
diff -u -p -r1.294 elflink.c
--- bfd/elflink.c	21 Jan 2008 03:53:07 -0000	1.294
+++ bfd/elflink.c	14 Feb 2008 08:23:51 -0000
@@ -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_in
       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

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]