From 0e1a166b287f476e03396c78184211720765aa5e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 18 Sep 2001 10:08:15 +0000 Subject: * 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. --- gas/write.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gas/write.c') 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. */ -- cgit v1.1