Fix build errors in with clang in gdb.compile/compile-cplus.c
[deliverable/binutils-gdb.git] / gdb / gnu-nat.c
index 93a50becceb66d33cd52fcde4690e94367f8fbd6..3b438a9a434635cce204117951f094114c01814e 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface GDB to the GNU Hurd.
-   Copyright (C) 1992-2019 Free Software Foundation, Inc.
+   Copyright (C) 1992-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -2195,7 +2195,6 @@ void
 gnu_nat_target::attach (const char *args, int from_tty)
 {
   int pid;
-  char *exec_file;
   struct inf *inf = cur_inf ();
   struct inferior *inferior;
 
@@ -2206,7 +2205,7 @@ gnu_nat_target::attach (const char *args, int from_tty)
 
   if (from_tty)
     {
-      exec_file = (char *) get_exec_file (0);
+      const char *exec_file = get_exec_file (0);
 
       if (exec_file)
        printf_unfiltered ("Attaching to program `%s', pid %d\n",
@@ -2260,7 +2259,7 @@ gnu_nat_target::detach (inferior *inf, int from_tty)
 
   if (from_tty)
     {
-      char *exec_file = get_exec_file (0);
+      const char *exec_file = get_exec_file (0);
 
       if (exec_file)
        printf_unfiltered ("Detaching from program `%s' pid %d\n",
@@ -3501,8 +3500,9 @@ to the thread's initial suspend-count when gdb notices the threads."),
           &thread_cmd_list);
 }
 
+void _initialize_gnu_nat ();
 void
-_initialize_gnu_nat (void)
+_initialize_gnu_nat ()
 {
   proc_server = getproc ();
 
This page took 0.024996 seconds and 4 git commands to generate.