public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Fix "unused variable" warnings
@ 2010-09-06  9:47 Maxim Kuvyrkov
  2010-09-06 10:59 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Kuvyrkov @ 2010-09-06  9:47 UTC (permalink / raw)
  To: gdb-patches; +Cc: Stan Shebs, Daniel Jacobowitz

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

The following patch removes several warnings when compiling GDBserver 
with GCC 4.5.

OK to apply?

-- 
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724

[-- Attachment #2: fsf-gdb-warnings.ChangeLog --]
[-- Type: text/plain, Size: 309 bytes --]

2010-09-06  Maxim Kuvyrkov  <maxim@codesourcery.com>

	gdb/gdbserver/
	* linux-low.c (linux_kill, linux_fast_tracepoint_collecting,)
	(linux_stabilize_threads): Remove unused local variables.
	* server.c (start_inferior, queue_stop_reply_callback,)
	(do_action_at_tracepoints): Remove unused local variables.

[-- Attachment #3: fsf-gdb-warnings.patch --]
[-- Type: text/plain, Size: 3563 bytes --]

Index: gdb/gdbserver/linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.159
diff -u -p -r1.159 linux-low.c
--- gdb/gdbserver/linux-low.c	27 Aug 2010 00:16:48 -0000	1.159
+++ gdb/gdbserver/linux-low.c	6 Sep 2010 07:27:02 -0000
@@ -769,7 +769,6 @@ linux_kill (int pid)
 {
   struct process_info *process;
   struct lwp_info *lwp;
-  struct thread_info *thread;
   int wstat;
   int lwpid;
 
@@ -786,7 +785,6 @@ linux_kill (int pid)
   /* See the comment in linux_kill_one_lwp.  We did not kill the first
      thread in the list, so do so now.  */
   lwp = find_lwp_pid (pid_to_ptid (pid));
-  thread = get_lwp_thread (lwp);
 
   if (debug_threads)
     fprintf (stderr, "lk_1: killing lwp %ld, for pid: %d\n",
@@ -1195,9 +1193,6 @@ linux_fast_tracepoint_collecting (struct
 static int
 maybe_move_out_of_jump_pad (struct lwp_info *lwp, int *wstat)
 {
-  struct thread_info *saved_inferior;
-
-  saved_inferior = current_inferior;
   current_inferior = get_lwp_thread (lwp);
 
   if ((wstat == NULL
@@ -1901,13 +1896,12 @@ linux_stabilize_threads (void)
     {
       struct target_waitstatus ourstatus;
       struct lwp_info *lwp;
-      ptid_t ptid;
       int wstat;
 
       /* Note that we go through the full wait even loop.  While
 	 moving threads out of jump pad, we need to be able to step
 	 over internal breakpoints and such.  */
-      ptid = linux_wait_1 (minus_one_ptid, &ourstatus, 0);
+      linux_wait_1 (minus_one_ptid, &ourstatus, 0);
 
       if (ourstatus.kind == TARGET_WAITKIND_STOPPED)
 	{
Index: gdb/gdbserver/server.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
retrieving revision 1.131
diff -u -p -r1.131 server.c
--- gdb/gdbserver/server.c	27 Aug 2010 00:16:48 -0000	1.131
+++ gdb/gdbserver/server.c	6 Sep 2010 07:27:02 -0000
@@ -276,13 +276,12 @@ start_inferior (char **argv)
   if (wrapper_argv != NULL)
     {
       struct thread_resume resume_info;
-      ptid_t ptid;
 
       resume_info.thread = pid_to_ptid (signal_pid);
       resume_info.kind = resume_continue;
       resume_info.sig = 0;
 
-      ptid = mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
+      mywait (pid_to_ptid (signal_pid), &last_status, 0, 0);
 
       if (last_status.kind != TARGET_WAITKIND_STOPPED)
 	return signal_pid;
@@ -2158,11 +2157,6 @@ queue_stop_reply_callback (struct inferi
      manage the thread's last_status field.  */
   if (the_target->thread_stopped == NULL)
     {
-      struct target_waitstatus status;
-
-      status.kind = TARGET_WAITKIND_STOPPED;
-      status.value.sig = TARGET_SIGNAL_TRAP;
-
       /* Pass the last stop reply back to GDB, but don't notify
 	 yet.  */
       queue_stop_reply (entry->id, &thread->last_status);
Index: gdb/gdbserver/tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/tracepoint.c,v
retrieving revision 1.9
diff -u -p -r1.9 tracepoint.c
--- gdb/gdbserver/tracepoint.c	1 Jul 2010 10:36:11 -0000	1.9
+++ gdb/gdbserver/tracepoint.c	6 Sep 2010 07:27:02 -0000
@@ -4129,14 +4129,10 @@ do_action_at_tracepoint (struct tracepoi
       }
     case 'R':
       {
-	struct collect_registers_action *raction;
-
 	unsigned char *regspace;
 	struct regcache tregcache;
 	struct regcache *context_regcache;
 
-	raction = (struct collect_registers_action *) taction;
-
 	trace_debug ("Want to collect registers");
 
 	/* Collect all registers for now.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix "unused variable" warnings
  2010-09-06  9:47 Fix "unused variable" warnings Maxim Kuvyrkov
@ 2010-09-06 10:59 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2010-09-06 10:59 UTC (permalink / raw)
  To: gdb-patches; +Cc: Maxim Kuvyrkov, Stan Shebs, Daniel Jacobowitz

On Monday 06 September 2010 08:35:40, Maxim Kuvyrkov wrote:
> The following patch removes several warnings when compiling GDBserver 
> with GCC 4.5.
> 
> OK to apply?

See <http://sourceware.org/ml/gdb-patches/2010-09/msg00081.html> and
review in follow up.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-06  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06  9:47 Fix "unused variable" warnings Maxim Kuvyrkov
2010-09-06 10:59 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).