Fix -Wshadow=local warning in sol_thread_target::wait
authorTom Tromey <tom@tromey.com>
Fri, 5 Oct 2018 13:28:16 +0000 (07:28 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 5 Oct 2018 16:38:01 +0000 (10:38 -0600)
Rainer pointed out that -Wshadow=local broke the Solaris build.
This fixes it.

gdb/ChangeLog
2018-10-05  Tom Tromey  <tom@tromey.com>

* sol-thread.c (sol_thread_target::wait): Rename inner
"save_ptid".

gdb/ChangeLog
gdb/sol-thread.c

index 912bdecfb20ccd7de8c66348671e7825a4da6def..a533ffdba22e9b62fac36f31d8e9201a0550adc9 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-05  Tom Tromey  <tom@tromey.com>
+
+       * sol-thread.c (sol_thread_target::wait): Rename inner
+       "save_ptid".
+
 2018-10-04  Tom Tromey  <tom@tromey.com>
 
        * configure: Rebuild.
index 5cdc9a8c1e5e6c783af0dd9f5d3fc51d1c98e0e9..682302a40bebf71195621cacb64ff0533c62d892 100644 (file)
@@ -440,14 +440,14 @@ sol_thread_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
 
   if (ptid.pid () != -1)
     {
-      ptid_t save_ptid = ptid;
+      ptid_t ptid_for_warning = ptid;
 
       ptid = thread_to_lwp (ptid, -2);
       if (ptid.pid () == -2)           /* Inactive thread.  */
        error (_("This version of Solaris can't start inactive threads."));
       if (info_verbose && ptid.pid () == -1)
        warning (_("Specified thread %ld seems to have terminated"),
-                save_ptid.tid ());
+                ptid_for_warning.tid ());
     }
 
   rtnval = beneath ()->wait (ptid, ourstatus, options);
This page took 0.042535 seconds and 4 git commands to generate.