forked from Imagelibrary/binutils-gdb
1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid
possible nested-if confusion.
* breakpoint.c (breakpoint_here_p): Ditto.
(breakpoint_inserted_here_p): Ditto.
(breakpoint_thread_match): Ditto.
* gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined.
* gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability
prototypes.
* symtab.h: Add prototype for _initialize_source.
* value.h: Add prototype for _initialize_value.
* defs.h: Include sys/types.h or stddef.h to get size_t.
(make_cleanup): Add make_cleanup_func typedef and switch to using
a prototype for this function.
(mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't
using mmalloc.
* ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c
dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c
infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c:
Cast parameters passed to make_cleanup to use the new
make_cleanup_func typedef.
More warning cleanups. There are still a bunch of places where the first
argument to make_cleanup is not cast to (make_cleanup_func); these are
either due to the function fitting the make_cleanup_func specification
already (e.g. free()) or they are in files that weren't compiled when
I did my make on a Linux native system. Bwahahaha. You can see them
like this:
grep make_cleanup\ * | grep -v make_cleanup_func
I'll surely go back and clean up the remaining suspicious calls in
GDB one of these days. :-)
This commit is contained in:
@@ -616,7 +616,7 @@ gdb_eval (clientData, interp, objc, objv)
|
||||
|
||||
expr = parse_expression (Tcl_GetStringFromObj (objv[1], NULL));
|
||||
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
|
||||
|
||||
val = evaluate_expression (expr);
|
||||
|
||||
@@ -816,7 +816,7 @@ gdb_load_info (clientData, interp, objc, objv)
|
||||
Tcl_SetStringObj (result_ptr->obj_ptr, "Open failed", -1);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
old_cleanups = make_cleanup (bfd_close, loadfile_bfd);
|
||||
old_cleanups = make_cleanup ((make_cleanup_func) bfd_close, loadfile_bfd);
|
||||
|
||||
if (!bfd_check_format (loadfile_bfd, bfd_object))
|
||||
{
|
||||
@@ -1370,7 +1370,7 @@ gdb_search (clientData, interp, objc, objv)
|
||||
|
||||
search_symbols (regexp, space, nfiles, files, &ss);
|
||||
if (ss != NULL)
|
||||
old_chain = make_cleanup (free_search_symbols, ss);
|
||||
old_chain = make_cleanup ((make_cleanup_func) free_search_symbols, ss);
|
||||
|
||||
Tcl_SetListObj(result_ptr->obj_ptr, 0, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user