diff options
author | Alan Modra <amodra@gmail.com> | 2001-09-18 10:08:15 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-09-18 10:08:15 +0000 |
commit | 0e1a166b287f476e03396c78184211720765aa5e (patch) | |
tree | 95ac560c3119f811766dd388976a9dbeec600bf1 /gas/write.c | |
parent | e59b4dfbd29ce7a0dc6f84fdb58d16cb31c988d8 (diff) | |
download | gdb-0e1a166b287f476e03396c78184211720765aa5e.zip gdb-0e1a166b287f476e03396c78184211720765aa5e.tar.gz gdb-0e1a166b287f476e03396c78184211720765aa5e.tar.bz2 |
* dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
* write.c (set_symtab): Update bfd_alloc declaration. Use a temp
var to ensure bfd_alloc arg is the right type.
(write_object_file): Cast args of bfd_seek. Replace bfd_write with
bfd_bwrite.
* config/obj-coff.c: Replace calls to bfd_write with calls to
bfd_bwrite. Cast args of bfd_seek.
* config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
warning.
* config/tc-mn10300.c (set_arch_mach): Make param unsigned.
* config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
call to bfd_bread.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/write.c b/gas/write.c index 14fbf04..280fedc 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1365,7 +1365,7 @@ set_symtab () asymbol **asympp; symbolS *symp; boolean result; - extern PTR bfd_alloc PARAMS ((bfd *, size_t)); + extern PTR bfd_alloc PARAMS ((bfd *, bfd_size_type)); /* Count symbols. We can't rely on a count made by the loop in write_object_file, because *_frob_file may add a new symbol or @@ -1377,9 +1377,9 @@ set_symtab () if (nsyms) { int i; + bfd_size_type amt = (bfd_size_type) nsyms * sizeof (asymbol *); - asympp = (asymbol **) bfd_alloc (stdoutput, - nsyms * sizeof (asymbol *)); + asympp = (asymbol **) bfd_alloc (stdoutput, amt); symp = symbol_rootP; for (i = 0; i < nsyms; i++, symp = symbol_next (symp)) { @@ -1880,8 +1880,8 @@ write_object_file () obj_emit_strings (&next_object_file_charP); #ifdef BFD_HEADERS - bfd_seek (stdoutput, 0, 0); - bfd_write (the_object_file, 1, object_file_size, stdoutput); + bfd_seek (stdoutput, (file_ptr) 0, 0); + bfd_bwrite (the_object_file, (bfd_size_type) object_file_size, stdoutput); #else /* Write the data to the file. */ |