summaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-10 13:40:44 +0000
committerNick Clifton <nickc@redhat.com>2009-09-10 13:40:44 +0000
commit77a6b991cd7f629d13ead2e4054d3f2d50053de2 (patch)
tree87646dab04647651edc90bcc24bf957331800468 /binutils/ar.c
parented2a438c4af0d3b386e852fffbc5d4de863d2863 (diff)
downloadbinutils-redhat-77a6b991cd7f629d13ead2e4054d3f2d50053de2.tar.gz
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/ar.c')
-rw-r--r--binutils/ar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 4d6a32516a..5bffd50a66 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -332,7 +332,7 @@ normalize (const char *file, bfd *abfd)
char *s;
/* Space leak. */
- s = xmalloc (abfd->xvec->ar_max_namelen + 1);
+ s = (char *) xmalloc (abfd->xvec->ar_max_namelen + 1);
memcpy (s, filename, abfd->xvec->ar_max_namelen);
s[abfd->xvec->ar_max_namelen] = '\0';
filename = s;
@@ -372,7 +372,7 @@ main (int argc, char **argv)
char c;
enum
{
- none = 0, delete, replace, print_table,
+ none = 0, del, replace, print_table,
print_files, extract, move, quick_append
} operation = none;
int arg_index;
@@ -540,7 +540,7 @@ main (int argc, char **argv)
switch (c)
{
case 'd':
- operation = delete;
+ operation = del;
operation_alters_arch = TRUE;
break;
case 'm':
@@ -673,7 +673,7 @@ main (int argc, char **argv)
if (counted_name_mode)
{
- if (operation != extract && operation != delete)
+ if (operation != extract && operation != del)
fatal (_("`N' is only meaningful with the `x' and `d' options."));
counted_name_counter = atoi (argv[arg_index++]);
if (counted_name_counter <= 0)
@@ -705,7 +705,7 @@ main (int argc, char **argv)
map_over_members (arch, extract_file, files, file_count);
break;
- case delete:
+ case del:
if (files != NULL)
delete_members (arch, files);
else
@@ -843,7 +843,7 @@ static void
print_contents (bfd *abfd)
{
size_t ncopied = 0;
- char *cbuf = xmalloc (BUFSIZE);
+ char *cbuf = (char *) xmalloc (BUFSIZE);
struct stat buf;
size_t size;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
@@ -895,7 +895,7 @@ void
extract_file (bfd *abfd)
{
FILE *ostream;
- char *cbuf = xmalloc (BUFSIZE);
+ char *cbuf = (char *) xmalloc (BUFSIZE);
size_t nread, tocopy;
size_t ncopied = 0;
size_t size;
@@ -989,7 +989,7 @@ write_archive (bfd *iarch)
char *old_name, *new_name;
bfd *contents_head = iarch->archive_next;
- old_name = xmalloc (strlen (bfd_get_filename (iarch)) + 1);
+ old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1);
strcpy (old_name, bfd_get_filename (iarch));
new_name = make_tempname (old_name);