diff options
author | Nick Clifton <nickc@redhat.com> | 2009-09-10 13:40:44 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-09-10 13:40:44 +0000 |
commit | 3f5e193bd6e036c43af9326d777aed6cfc14fbcb (patch) | |
tree | ca5ab96592667cbb90238e7b707b8655b9afbf00 /binutils/nm.c | |
parent | c8676ae4523f210705553322445efeae9df702b0 (diff) | |
download | gdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.zip gdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.tar.gz gdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.tar.bz2 |
Updated soruces in binutils/* to compile cleanly with -Wc++-compat.
* binutils/addr2line.c (slurp_symtab): Fix casts. Introduce
variable minisyms to avoid aliasing varning.
* binutils/ar.c: Add casts. (normalize): Use name del instead of
delete. (display_target_list,display_info_table): Change loop
counter variable a to int.
* binutils/bucomm.c: Add casts.
* binutils/debug.c: Update function to use new names. (struct
debug_baseclass): Rename member from virtual to
is_virtual. (struct debug_type_s,struct debug_field_s,struct
debug_baseclass_s,struct debug_method_s,struct
debug_method_variant_s,struct debug_type_s): Rename struct from
avoid name collision.
* /binutils/debug.h: Use new struct names.
* binutils/dwarf.c: Add casts. (free_debug_memory): Change loop
counter variable a to int.
* binutils/ieee.c: Add casts. (enum ieee_var_kind): Move to top
level. (ieee_class_baseclass): Rename parameter virtual to
is_virtual. (ieee_class_method_var): Rename variable virtual to
is_virtual.
* binutils/nm.c: Add casts.
* binutils/objcopy.c: Add casts. (copy_archive): Rename variable
delete to del.
* binutils/objdump.c: Add casts. (dump_dwarf_section): Change loop
counter variable i to int.
* binutils/prdbg.c: Add
casts. (pr_class_baseclass,tg_class_baseclass): Rename parameters
virtual to is_virtual.
* binutils/readelf.c: Add casts. (struct
ia64_unw_table_entry,struct hppa_unw_table_entry): Move to top
level.
* binutils/size.c: Add casts.
* binutils/stabs.c (parse_stab_type, parse_stab_range_type)
(parse_stab_cpp_abbrev): Rename parameter from typename to
type_name. (parse_stab_baseclasses): Rename variable virtual to
is_virtual.
* binutils/strings.c: Add casts.
* binutils/wrstabs.c (stab_class_baseclass): Rename parameter
virtual to is_virtual.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r-- | binutils/nm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/binutils/nm.c b/binutils/nm.c index 5139471..c838b0a 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -672,7 +672,7 @@ sort_symbols_by_size (bfd *abfd, bfd_boolean dynamic, void *minisyms, /* We are going to return a special set of symbols and sizes to print. */ - symsizes = xmalloc (symcount * sizeof (struct size_sym)); + symsizes = (struct size_sym *) xmalloc (symcount * sizeof (struct size_sym)); *symsizesp = symsizes; /* Note that filter_symbols has already removed all absolute and @@ -773,7 +773,7 @@ get_relocs (bfd *abfd, asection *sec, void *dataarg) if (relsize < 0) bfd_fatal (bfd_get_filename (abfd)); - *data->relocs = xmalloc (relsize); + *data->relocs = (arelent **) xmalloc (relsize); *data->relcount = bfd_canonicalize_reloc (abfd, sec, *data->relocs, data->syms); if (*data->relcount < 0) @@ -828,7 +828,7 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd) symsize = bfd_get_symtab_upper_bound (abfd); if (symsize < 0) bfd_fatal (bfd_get_filename (abfd)); - syms = xmalloc (symsize); + syms = (asymbol **) xmalloc (symsize); symcount = bfd_canonicalize_symtab (abfd, syms); if (symcount < 0) bfd_fatal (bfd_get_filename (abfd)); @@ -865,9 +865,9 @@ print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd) seccount = bfd_count_sections (abfd); - secs = xmalloc (seccount * sizeof *secs); - relocs = xmalloc (seccount * sizeof *relocs); - relcount = xmalloc (seccount * sizeof *relcount); + secs = (asection **) xmalloc (seccount * sizeof *secs); + relocs = (arelent ***) xmalloc (seccount * sizeof *relocs); + relcount = (long *) xmalloc (seccount * sizeof *relcount); info.secs = secs; info.relocs = relocs; @@ -1025,18 +1025,18 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) if (dynamic) { dyn_count = symcount; - dyn_syms = minisyms; + dyn_syms = (asymbol **) minisyms; } else { long storage = bfd_get_dynamic_symtab_upper_bound (abfd); static_count = symcount; - static_syms = minisyms; + static_syms = (asymbol **) minisyms; if (storage > 0) { - dyn_syms = xmalloc (storage); + dyn_syms = (asymbol **) xmalloc (storage); dyn_count = bfd_canonicalize_dynamic_symtab (abfd, dyn_syms); if (dyn_count < 0) bfd_fatal (bfd_get_filename (abfd)); @@ -1051,7 +1051,7 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) long i; new_mini = xmalloc ((symcount + synth_count + 1) * sizeof (*symp)); - symp = new_mini; + symp = (asymbol **) new_mini; memcpy (symp, minisyms, symcount * sizeof (*symp)); symp += symcount; for (i = 0; i < synth_count; i++) |