mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
* ar.c (print_contents): Cast args of bfd_seek to the right types.
Replace bfd_read call with call to bfd_bread. (extract_file): Likewise. * objdump.c (dump_section_header): Cast section->filepos to unsigned long to suit printf format string. * readelf.c (process_section_headers): Similarly for sh_offset. (process_unwind): Likewise.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/* ar.c - Archive modify and extract.
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
@@ -827,7 +828,7 @@ print_contents (abfd)
|
||||
/* xgettext:c-format */
|
||||
printf (_("\n<member %s>\n\n"), bfd_get_filename (abfd));
|
||||
|
||||
bfd_seek (abfd, 0, SEEK_SET);
|
||||
bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
|
||||
|
||||
size = buf.st_size;
|
||||
while (ncopied < size)
|
||||
@@ -838,8 +839,7 @@ print_contents (abfd)
|
||||
if (tocopy > BUFSIZE)
|
||||
tocopy = BUFSIZE;
|
||||
|
||||
nread = bfd_read (cbuf, 1, tocopy, abfd); /* oops -- broke
|
||||
abstraction! */
|
||||
nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
|
||||
if (nread != tocopy)
|
||||
/* xgettext:c-format */
|
||||
fatal (_("%s is not a valid archive"),
|
||||
@@ -883,7 +883,7 @@ extract_file (abfd)
|
||||
if (verbose)
|
||||
printf ("x - %s\n", bfd_get_filename (abfd));
|
||||
|
||||
bfd_seek (abfd, 0, SEEK_SET);
|
||||
bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
|
||||
|
||||
ostream = NULL;
|
||||
if (size == 0)
|
||||
@@ -907,7 +907,7 @@ extract_file (abfd)
|
||||
if (tocopy > BUFSIZE)
|
||||
tocopy = BUFSIZE;
|
||||
|
||||
nread = bfd_read (cbuf, 1, tocopy, abfd);
|
||||
nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
|
||||
if (nread != tocopy)
|
||||
/* xgettext:c-format */
|
||||
fatal (_("%s is not a valid archive"),
|
||||
|
||||
Reference in New Issue
Block a user