diff options
author | Alan Modra <amodra@gmail.com> | 2005-02-20 14:59:07 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-02-20 14:59:07 +0000 |
commit | f075ee0c61d4b9982a7390d3760f764185f5d36e (patch) | |
tree | bfb663a3ea106dcb6b50b35bcf8531daaad1d4bb /bfd/coff-rs6000.c | |
parent | a6c442d88114a76fe77ff3e3f6aa62993703759d (diff) | |
download | gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.zip gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.tar.gz gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.tar.bz2 |
include/
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
include/coff/
* xcoff.h (struct xcoff_loader_info): Warning fix.
bfd/
* bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
* coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
* coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
useless assignments.
(xcoff_write_archive_contents_big): Likewise.
(_bfd_xcoff_put_ldsymbol_name): Likewise.
* coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
* coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
* cofflink.c (process_embedded_commands): Warning fixes.
* cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
Warning fixes.
* dwarf2.c: Warning fixes.
* elf-bfd.h: Likewise.
* elf-eh-frame.c: Likewise.
* elf-strtab.c: Likewise.
* elf.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-sh-symbian.c: Likewise.
* elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
* elf64-sh64.c: Likewise.
* peicode.h: Likewise.
* elf64-mmix.c: Warning fixes.
* elfcode.h: Likewise.
* elfxx-mips.c: Likewise.
* libbfd-in.h: Likewise.
* libbfd.c: Likewise.
* mach-o.c: Likewise.
* merge.c: Likewise.
* mmo.c: Likewise.
* opncls.c: Likewise.
* pef.c: Likewise.
* srec.c: Likewise.
* vms-hdr.c: Likewise.
* vms-tir.c: Likewise.
* xtensa-isa.c: Likewise.
* xtensa-modules.c: Likewise.
* xsym.c: Likewise.
(pstrcmp): Use correct choice of string lengths. Fix return value.
(bfd_sym_module_name): Correct string length.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
Diffstat (limited to 'bfd/coff-rs6000.c')
-rw-r--r-- | bfd/coff-rs6000.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 1257fbb..7b2b16b 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for IBM RS/6000 "XCOFF" files. - Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004 + Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. FIXME: Can someone provide a transliteration of this name into ASCII? Using the following chars caused a compiler warning on HIUX (so I replaced @@ -1849,8 +1849,8 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) if (sym_32) { struct xcoff_ar_hdr_big *hdr; - bfd_byte *symbol_table; - bfd_byte *st; + char *symbol_table; + char *st; file_ptr fileoff; bfd_vma symbol_table_size = @@ -1860,8 +1860,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) + 8 * sym_32 + str_32 + (str_32 & 1); - symbol_table = NULL; - symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size); + symbol_table = bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) return FALSE; @@ -1941,7 +1940,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) bfd_bwrite (symbol_table, symbol_table_size, abfd); free (symbol_table); - symbol_table = NULL; prevoff = nextoff; nextoff = nextoff + symbol_table_size; @@ -1952,8 +1950,8 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) if (sym_64) { struct xcoff_ar_hdr_big *hdr; - bfd_byte *symbol_table; - bfd_byte *st; + char *symbol_table; + char *st; file_ptr fileoff; bfd_vma symbol_table_size = @@ -1963,8 +1961,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) + 8 * sym_64 + str_64 + (str_64 & 1); - symbol_table = NULL; - symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size); + symbol_table = bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) return FALSE; @@ -2039,7 +2036,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) bfd_bwrite (symbol_table, symbol_table_size, abfd); free (symbol_table); - symbol_table = NULL; PRINT20 (fhdr->symoff64, nextoff); } @@ -2311,7 +2307,7 @@ xcoff_write_archive_contents_big (abfd) size_t i; struct xcoff_ar_hdr_big *hdr, ahdr; bfd_size_type size; - bfd_byte *member_table, *mt; + char *member_table, *mt; bfd_vma member_table_size; memset (&fhdr, 0, SIZEOF_AR_FILE_HDR_BIG); @@ -2476,8 +2472,7 @@ xcoff_write_archive_contents_big (abfd) + total_namlen); member_table_size += member_table_size & 1; - member_table = NULL; - member_table = (bfd_byte *) bfd_zmalloc (member_table_size); + member_table = bfd_zmalloc (member_table_size); if (member_table == NULL) return FALSE; @@ -2530,7 +2525,6 @@ xcoff_write_archive_contents_big (abfd) return FALSE; free (member_table); - member_table = NULL; PRINT20 (fhdr.memoff, nextoff); @@ -3530,7 +3524,7 @@ _bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name) if (ldinfo->string_size + len + 3 > ldinfo->string_alc) { bfd_size_type newalc; - bfd_byte *newstrings; + char *newstrings; newalc = ldinfo->string_alc * 2; if (newalc == 0) @@ -3538,8 +3532,7 @@ _bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name) while (ldinfo->string_size + len + 3 > newalc) newalc *= 2; - newstrings = ((bfd_byte *) - bfd_realloc ((PTR) ldinfo->strings, newalc)); + newstrings = bfd_realloc (ldinfo->strings, newalc); if (newstrings == NULL) { ldinfo->failed = TRUE; |