From: Andrew Cagney Date: Tue, 19 Jan 1999 12:28:20 +0000 (+0000) Subject: More make_cleanups/catch_errors warning fixes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b067270734c946050e4d665f0d4adae0374161c;p=binutils-gdb.git More make_cleanups/catch_errors warning fixes. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9951ef10156..ddf907bcd10 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +Tue Jan 19 18:07:11 1999 Andrew Cagney + + * 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 * remote-array.c (array_open): Don't use fprintf_filtered to send diff --git a/gdb/corelow.c b/gdb/corelow.c index 51e1adcecda..e635257b2f4 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -42,7 +42,7 @@ static struct core_fns *core_file_fns = NULL; static void core_files_info PARAMS ((struct target_ops *)); #ifdef SOLIB_ADD -static int solib_add_stub PARAMS ((char *)); +static int solib_add_stub PARAMS ((PTR)); #endif static void core_open PARAMS ((char *, int)); @@ -119,7 +119,7 @@ core_close (quitting) static int solib_add_stub (from_ttyp) - char *from_ttyp; + PTR from_ttyp; { SOLIB_ADD (NULL, *(int *)from_ttyp, ¤t_target); 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, on error it does not free all the storage associated with the bfd). */ - make_cleanup (bfd_close, temp_bfd); + make_cleanup ((make_cleanup_func) bfd_close, temp_bfd); error ("\"%s\" is not a core dump: %s", core, bfd_errmsg (bfd_get_error ())); } diff --git a/gdb/solib.c b/gdb/solib.c index ba907f06b9e..3709469d90f 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -174,8 +174,7 @@ enable_break PARAMS ((void)); static void info_sharedlibrary_command PARAMS ((char *, int)); -static int -symbol_add_stub PARAMS ((char *)); +static int symbol_add_stub PARAMS ((PTR)); static struct so_list * find_solib PARAMS ((struct so_list *)); @@ -186,8 +185,7 @@ first_link_map_member PARAMS ((void)); static CORE_ADDR locate_base PARAMS ((void)); -static int -solib_map_sections PARAMS ((char *)); +static int solib_map_sections PARAMS ((PTR)); #ifdef SVR4_SHARED_LIBS @@ -247,7 +245,7 @@ FIXMES static int solib_map_sections (arg) - char *arg; + PTR arg; { struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */ char *filename; @@ -999,7 +997,7 @@ find_solib (so_list_ptr) strncpy (new -> so_name, buffer, MAX_PATH_SIZE - 1); new -> so_name[MAX_PATH_SIZE - 1] = '\0'; free (buffer); - catch_errors (solib_map_sections, (char *) new, + catch_errors (solib_map_sections, new, "Error while mapping shared library sections:\n", RETURN_MASK_ALL); } @@ -1011,7 +1009,7 @@ find_solib (so_list_ptr) static int symbol_add_stub (arg) - char *arg; + PTR arg; { register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */ CORE_ADDR text_addr = 0; @@ -1176,7 +1174,7 @@ solib_add (arg_string, from_tty, target) } } else if (catch_errors - (symbol_add_stub, (char *) so, + (symbol_add_stub, so, "Error while reading shared library symbols:\n", RETURN_MASK_ALL)) {