aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-02-20 14:59:07 +0000
committerAlan Modra <amodra@gmail.com>2005-02-20 14:59:07 +0000
commitf075ee0c61d4b9982a7390d3760f764185f5d36e (patch)
treebfb663a3ea106dcb6b50b35bcf8531daaad1d4bb /bfd/libbfd.c
parenta6c442d88114a76fe77ff3e3f6aa62993703759d (diff)
downloadgdb-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/libbfd.c')
-rw-r--r--bfd/libbfd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index ec1864c..26ab404 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1,6 +1,6 @@
/* Assorted BFD support routines, only used internally.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -865,12 +865,12 @@ warn_deprecated (const char *what,
bfd_vma
read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
+ bfd_byte *buf,
unsigned int *bytes_read_ptr)
{
bfd_vma result;
unsigned int num_read;
- int shift;
+ unsigned int shift;
unsigned char byte;
result = 0;
@@ -878,7 +878,7 @@ read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
num_read = 0;
do
{
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ byte = bfd_get_8 (abfd, buf);
buf++;
num_read++;
result |= (((bfd_vma) byte & 0x7f) << shift);
@@ -893,12 +893,12 @@ read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
bfd_signed_vma
read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
- char *buf,
- unsigned int * bytes_read_ptr)
+ bfd_byte *buf,
+ unsigned int *bytes_read_ptr)
{
bfd_vma result;
- unsigned shift;
- int num_read;
+ unsigned int shift;
+ unsigned int num_read;
unsigned char byte;
result = 0;
@@ -906,14 +906,14 @@ read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
num_read = 0;
do
{
- byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ byte = bfd_get_8 (abfd, buf);
buf ++;
num_read ++;
result |= (((bfd_vma) byte & 0x7f) << shift);
shift += 7;
}
while (byte & 0x80);
- if ((shift < 8 * sizeof (result)) && (byte & 0x40))
+ if (shift < 8 * sizeof (result) && (byte & 0x40))
result |= (((bfd_vma) -1) << shift);
*bytes_read_ptr = num_read;
return result;