X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf-strtab.c;h=7d2fad4e51762ecd052a3300db5ffd5e5656c112;hb=51020d214bfe2cd8b912db0f3f2fafb40df28bc2;hp=f5013d15e4a725d8f5b8c2969afda602efb6194f;hpb=515ef31dec50185cc5d8a6f88b51832bfd259e87;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index f5013d15e4..7d2fad4e51 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -68,7 +68,8 @@ elf_strtab_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (entry == NULL) - entry = bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)); if (entry == NULL) return NULL; @@ -97,7 +98,7 @@ _bfd_elf_strtab_init (void) struct elf_strtab_hash *table; bfd_size_type amt = sizeof (struct elf_strtab_hash); - table = bfd_malloc (amt); + table = (struct elf_strtab_hash *) bfd_malloc (amt); if (table == NULL) return NULL; @@ -112,7 +113,8 @@ _bfd_elf_strtab_init (void) table->size = 1; table->alloced = 64; amt = sizeof (struct elf_strtab_hasn_entry *); - table->array = bfd_malloc (table->alloced * amt); + table->array = (struct elf_strtab_hash_entry **) + bfd_malloc (table->alloced * amt); if (table->array == NULL) { free (table); @@ -166,7 +168,8 @@ _bfd_elf_strtab_add (struct elf_strtab_hash *tab, { bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *); tab->alloced *= 2; - tab->array = bfd_realloc_or_free (tab->array, tab->alloced * amt); + tab->array = (struct elf_strtab_hash_entry **) + bfd_realloc_or_free (tab->array, tab->alloced * amt); if (tab->array == NULL) return (bfd_size_type) -1; } @@ -311,7 +314,7 @@ _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab) /* Sort the strings by suffix and length. */ amt = tab->size * sizeof (struct elf_strtab_hash_entry *); - array = bfd_malloc (amt); + array = (struct elf_strtab_hash_entry **) bfd_malloc (amt); if (array == NULL) goto alloc_failure;