From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20072 invoked by alias); 6 Sep 2010 07:35:53 -0000 Received: (qmail 20061 invoked by uid 22791); 6 Sep 2010 07:35:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Sep 2010 07:35:44 +0000 Received: (qmail 24433 invoked from network); 6 Sep 2010 07:35:42 -0000 Received: from unknown (HELO mbp.local) (maxim@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Sep 2010 07:35:42 -0000 Message-ID: <4C8499CC.7050209@codesourcery.com> Date: Mon, 06 Sep 2010 09:47:00 -0000 From: Maxim Kuvyrkov User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Stan Shebs , Daniel Jacobowitz Subject: Fix "unused variable" warnings Content-Type: multipart/mixed; boundary="------------030309020301080503040705" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00146.txt.bz2 This is a multi-part message in MIME format. --------------030309020301080503040705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 175 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 --------------030309020301080503040705 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="fsf-gdb-warnings.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fsf-gdb-warnings.ChangeLog" Content-length: 309 2010-09-06 Maxim Kuvyrkov 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. --------------030309020301080503040705 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="fsf-gdb-warnings.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fsf-gdb-warnings.patch" Content-length: 3563 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. */ --------------030309020301080503040705--