More make_cleanups/catch_errors warning fixes.
authorAndrew Cagney <cagney@redhat.com>
Tue, 19 Jan 1999 12:28:20 +0000 (12:28 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 19 Jan 1999 12:28:20 +0000 (12:28 +0000)
gdb/ChangeLog
gdb/corelow.c
gdb/solib.c

index 9951ef1..ddf907b 100644 (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>
 
        * remote-array.c (array_open): Don't use fprintf_filtered to send
index 51e1adc..e635257 100644 (file)
@@ -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, &current_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 ()));
     }
index ba907f0..3709469 100644 (file)
@@ -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))
            {