More make_cleanups/catch_errors warning fixes.

This commit is contained in:
Andrew Cagney 1999-01-19 12:28:20 +00:00
parent bc8bd256d0
commit 3b06727073
3 changed files with 17 additions and 11 deletions

View File

@ -1,3 +1,11 @@
Tue Jan 19 18:07:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
* corelow.c (solib_add_stub): Ditto.
(core_file_to_sym_file): Cast make_cleanup parameter.
* solib.c (symbol_add_stub, solib_map_sections): Change argument
to PTR insted of a char*. Matches catch_errors interface.
Mon Jan 18 14:01:24 1999 Andrew Cagney <cagney@b1.cygnus.com> Mon Jan 18 14:01:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
* remote-array.c (array_open): Don't use fprintf_filtered to send * remote-array.c (array_open): Don't use fprintf_filtered to send

View File

@ -42,7 +42,7 @@ static struct core_fns *core_file_fns = NULL;
static void core_files_info PARAMS ((struct target_ops *)); static void core_files_info PARAMS ((struct target_ops *));
#ifdef SOLIB_ADD #ifdef SOLIB_ADD
static int solib_add_stub PARAMS ((char *)); static int solib_add_stub PARAMS ((PTR));
#endif #endif
static void core_open PARAMS ((char *, int)); static void core_open PARAMS ((char *, int));
@ -119,7 +119,7 @@ core_close (quitting)
static int static int
solib_add_stub (from_ttyp) solib_add_stub (from_ttyp)
char *from_ttyp; PTR from_ttyp;
{ {
SOLIB_ADD (NULL, *(int *)from_ttyp, &current_target); SOLIB_ADD (NULL, *(int *)from_ttyp, &current_target);
re_enable_breakpoints_in_shlibs (); re_enable_breakpoints_in_shlibs ();
@ -401,7 +401,7 @@ core_file_to_sym_file (core)
/* FIXME: should be checking for errors from bfd_close (for one thing, /* FIXME: should be checking for errors from bfd_close (for one thing,
on error it does not free all the storage associated with the on error it does not free all the storage associated with the
bfd). */ bfd). */
make_cleanup (bfd_close, temp_bfd); make_cleanup ((make_cleanup_func) bfd_close, temp_bfd);
error ("\"%s\" is not a core dump: %s", error ("\"%s\" is not a core dump: %s",
core, bfd_errmsg (bfd_get_error ())); core, bfd_errmsg (bfd_get_error ()));
} }

View File

@ -174,8 +174,7 @@ enable_break PARAMS ((void));
static void static void
info_sharedlibrary_command PARAMS ((char *, int)); info_sharedlibrary_command PARAMS ((char *, int));
static int static int symbol_add_stub PARAMS ((PTR));
symbol_add_stub PARAMS ((char *));
static struct so_list * static struct so_list *
find_solib PARAMS ((struct so_list *)); find_solib PARAMS ((struct so_list *));
@ -186,8 +185,7 @@ first_link_map_member PARAMS ((void));
static CORE_ADDR static CORE_ADDR
locate_base PARAMS ((void)); locate_base PARAMS ((void));
static int static int solib_map_sections PARAMS ((PTR));
solib_map_sections PARAMS ((char *));
#ifdef SVR4_SHARED_LIBS #ifdef SVR4_SHARED_LIBS
@ -247,7 +245,7 @@ FIXMES
static int static int
solib_map_sections (arg) solib_map_sections (arg)
char *arg; PTR arg;
{ {
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */ struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename; char *filename;
@ -999,7 +997,7 @@ find_solib (so_list_ptr)
strncpy (new -> so_name, buffer, MAX_PATH_SIZE - 1); strncpy (new -> so_name, buffer, MAX_PATH_SIZE - 1);
new -> so_name[MAX_PATH_SIZE - 1] = '\0'; new -> so_name[MAX_PATH_SIZE - 1] = '\0';
free (buffer); free (buffer);
catch_errors (solib_map_sections, (char *) new, catch_errors (solib_map_sections, new,
"Error while mapping shared library sections:\n", "Error while mapping shared library sections:\n",
RETURN_MASK_ALL); RETURN_MASK_ALL);
} }
@ -1011,7 +1009,7 @@ find_solib (so_list_ptr)
static int static int
symbol_add_stub (arg) symbol_add_stub (arg)
char *arg; PTR arg;
{ {
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */ register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
CORE_ADDR text_addr = 0; CORE_ADDR text_addr = 0;
@ -1176,7 +1174,7 @@ solib_add (arg_string, from_tty, target)
} }
} }
else if (catch_errors else if (catch_errors
(symbol_add_stub, (char *) so, (symbol_add_stub, so,
"Error while reading shared library symbols:\n", "Error while reading shared library symbols:\n",
RETURN_MASK_ALL)) RETURN_MASK_ALL))
{ {