X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf-attrs.c;h=c34297ccdaabf8d8e4a8bd2d53931686bb2c5525;hb=a50b1753d42fa4c760f96d72890684d3a3a221d0;hp=27e683bcff8576ebf172087f1fc08d45adf0e055;hpb=b1dfe69a90d55c1a62fbf826e3269f3578abf967;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index 27e683bcff..c34297ccda 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -307,10 +307,10 @@ _bfd_elf_attr_strdup (bfd *abfd, const char * s) { char * p; int len; - + len = strlen (s) + 1; p = (char *) bfd_alloc (abfd, len); - return memcpy (p, s, len); + return (char *) memcpy (p, s, len); } /* Add a string object attribute. */ @@ -428,7 +428,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) bfd_vma len; const char *std_section; - contents = bfd_malloc (hdr->sh_size); + contents = (bfd_byte *) bfd_malloc (hdr->sh_size); if (!contents) return; if (!bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0,