strindex does not run us past the end, but right now we
don't know the length of the string table. */
strings += strindex;
- name = bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1);
+ name = (char *) bfd_alloc (abfd,
+ (bfd_size_type) strlen (strings) + 1);
if (name == NULL)
return FALSE;
strcpy (name, strings);
if (name == NULL)
{
/* Assorted wastage to null-terminate the name, thanks AT&T! */
- name = bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1);
+ name = (char *) bfd_alloc (abfd,
+ (bfd_size_type) sizeof (hdr->s_name) + 1);
if (name == NULL)
return FALSE;
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
scnhsz = bfd_coff_scnhsz (abfd);
readsize = (bfd_size_type) nscns * scnhsz;
- external_sections = bfd_alloc (abfd, readsize);
+ external_sections = (char *) bfd_alloc (abfd, readsize);
if (!external_sections)
goto fail;
amt = sec->reloc_count * relsz;
if (external_relocs == NULL)
{
- free_external = bfd_malloc (amt);
+ free_external = (bfd_byte *) bfd_malloc (amt);
if (free_external == NULL)
goto error_return;
external_relocs = free_external;
{
amt = sec->reloc_count;
amt *= sizeof (struct internal_reloc);
- free_internal = bfd_malloc (amt);
+ free_internal = (struct internal_reloc *) bfd_malloc (amt);
if (free_internal == NULL)
goto error_return;
internal_relocs = free_internal;
bfd_size_type amt;
amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1);
- newsyms = bfd_alloc (bfd_ptr, amt);
+ newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
if (!newsyms)
return FALSE;
bfd_ptr->outsymbols = newsyms;
{
unsigned int numaux = native->u.syment.n_numaux;
int type = native->u.syment.n_type;
- int n_sclass = native->u.syment.n_sclass;
+ int n_sclass = (int) native->u.syment.n_sclass;
void * buf;
bfd_size_type symesz;
}
sec_size = sect->size;
- debug_section = bfd_alloc (abfd, sec_size);
+ debug_section = (char *) bfd_alloc (abfd, sec_size);
if (debug_section == NULL)
return NULL;
if (name[len] == '\0')
break;
- if ((newname = bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL)
+ if ((newname = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL)
return NULL;
strncpy (newname, name, len);
return NULL;
}
- strings = bfd_malloc (strsize);
+ strings = (char *) bfd_malloc (strsize);
if (strings == NULL)
return NULL;
return obj_raw_syments (abfd);
size = obj_raw_syment_count (abfd) * sizeof (combined_entry_type);
- internal = bfd_zalloc (abfd, size);
+ internal = (combined_entry_type *) bfd_zalloc (abfd, size);
if (internal == NULL && size != 0)
return NULL;
internal_end = internal + obj_raw_syment_count (abfd);
if (internal_ptr->u.syment._n._n_name[i] == '\0')
break;
- newstring = bfd_zalloc (abfd, (bfd_size_type) (i + 1));
+ newstring = (char *) bfd_zalloc (abfd, (bfd_size_type) (i + 1));
if (newstring == NULL)
return NULL;
strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
combined_entry_type * native;
bfd_size_type amt = sizeof (* native);
- native = bfd_zalloc (abfd, amt);
+ native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (native == NULL)
return FALSE;