forked from Imagelibrary/binutils-gdb
* ax-gdb.c (agent_command): Remove now useless cast of
`free_current_contents' when passed to `make_cleanup'. * coffread.c (coff_symfile_read): Ditto. * dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto. (dwarf_decode_lines): Ditto. * eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto. (parse_and_eval, parse_to_comma_and_eval): Ditto. * parse.c (parse_exp_1): Ditto. * printcmd.c (print_command_1, output_command, set_command): Ditto. (x_command, print_frame_args, printf_command): Ditto. * top.c (execute_control_command): Ditto. * tracepoint.c (validate_actionline): Ditto. * typeprint.c (whatis_exp, ptype_command): Ditto. (maintenance_print_type): Ditto.
This commit is contained in:
@@ -1998,8 +1998,7 @@ dwarf2_add_member_fn (fip, die, type, objfile)
|
||||
(fip->nfnfields + DW_FIELD_ALLOC_CHUNK)
|
||||
* sizeof (struct fnfieldlist));
|
||||
if (fip->nfnfields == 0)
|
||||
make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&fip->fnfieldlists);
|
||||
make_cleanup (free_current_contents, &fip->fnfieldlists);
|
||||
}
|
||||
flp = &fip->fnfieldlists[fip->nfnfields];
|
||||
flp->name = fieldname;
|
||||
@@ -2506,8 +2505,7 @@ read_array_type (die, objfile)
|
||||
xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK)
|
||||
* sizeof (struct type *));
|
||||
if (ndim == 0)
|
||||
make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&range_types);
|
||||
make_cleanup (free_current_contents, &range_types);
|
||||
}
|
||||
range_types[ndim++] = create_range_type (NULL, index_type, low, high);
|
||||
}
|
||||
@@ -3760,8 +3758,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
|
||||
line_ptr += 1;
|
||||
lh.standard_opcode_lengths = (unsigned char *)
|
||||
xmalloc (lh.opcode_base * sizeof (unsigned char));
|
||||
back_to = make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&lh.standard_opcode_lengths);
|
||||
back_to = make_cleanup (free_current_contents, &lh.standard_opcode_lengths);
|
||||
|
||||
lh.standard_opcode_lengths[0] = 1;
|
||||
for (i = 1; i < lh.opcode_base; ++i)
|
||||
@@ -3780,7 +3777,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
|
||||
xrealloc (dirs.dirs,
|
||||
(dirs.num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *));
|
||||
if (dirs.num_dirs == 0)
|
||||
make_cleanup ((make_cleanup_func) free_current_contents, &dirs.dirs);
|
||||
make_cleanup (free_current_contents, &dirs.dirs);
|
||||
}
|
||||
dirs.dirs[dirs.num_dirs++] = cur_dir;
|
||||
}
|
||||
@@ -3797,8 +3794,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
|
||||
(files.num_files + FILE_ALLOC_CHUNK)
|
||||
* sizeof (struct fileinfo));
|
||||
if (files.num_files == 0)
|
||||
make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&files.files);
|
||||
make_cleanup (free_current_contents, &files.files);
|
||||
}
|
||||
files.files[files.num_files].name = cur_file;
|
||||
files.files[files.num_files].dir =
|
||||
@@ -3873,8 +3869,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
|
||||
(files.num_files + FILE_ALLOC_CHUNK)
|
||||
* sizeof (struct fileinfo));
|
||||
if (files.num_files == 0)
|
||||
make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&files.files);
|
||||
make_cleanup (free_current_contents, &files.files);
|
||||
}
|
||||
files.files[files.num_files].name = cur_file;
|
||||
files.files[files.num_files].dir =
|
||||
|
||||
Reference in New Issue
Block a user