This is the mail archive of the binutils@sources.redhat.com 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]

[PROPOSED BFD PATCH] warning nit


This patch removes a gcc warning compiling BFD.  While I was there, I added
a const to move 4 words from data to text as well.

Ok to commit?


Thanks,
Roland


2004-10-04  Roland McGrath  <roland@redhat.com>

	* hash.c (bfd_hash_set_default_size): Use const for table.
	Use size_t instead of int for variable compared to sizeof results.

--- hash.c.~1.13.~	2004-05-25 15:55:06.000000000 -0700
+++ hash.c	2004-10-04 11:53:51.313415376 -0700
@@ -504,12 +504,12 @@ bfd_hash_traverse (table, func, info)
 void
 bfd_hash_set_default_size (bfd_size_type hash_size)
 {
-  int index;
   /* Extend this prime list if you want more granularity of hash table size.  */
-  static bfd_size_type hash_size_primes[] =
+  static const bfd_size_type hash_size_primes[] =
     {
       1021, 4051, 8599, 16699
     };
+  size_t index;
 
   /* Work out best prime number near the hash_size.  */
   for (index = 0; index < ARRAY_SIZE (hash_size_primes) - 1; ++index)


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