From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14514 invoked by alias); 2 Sep 2010 09:46:56 -0000 Received: (qmail 14506 invoked by uid 22791); 2 Sep 2010 09:46:54 -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; Thu, 02 Sep 2010 09:46:49 +0000 Received: (qmail 30486 invoked from network); 2 Sep 2010 09:46:46 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Sep 2010 09:46:46 -0000 Message-ID: <4C7F7273.6090708@codesourcery.com> Date: Thu, 02 Sep 2010 14:00:00 -0000 From: Yao Qi User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [gdbserver] Remove unused variables Content-Type: multipart/mixed; boundary="------------030203030107000401090605" 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/msg00084.txt.bz2 This is a multi-part message in MIME format. --------------030203030107000401090605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 612 Hi, This patch is to remove unused variables in order to fix some build failures I find today on GDB CVS HEAD. gdb-mainline/gdb/gdbserver/server.c: In function 'start_inferior': gdb-mainline/gdb/gdbserver/server.c:276:14: error: variable 'ptid' set but not used [-Werror=unused-but-set-variable] gdb-mainline/gdb/gdbserver/server.c: In function 'queue_stop_reply_callback': gdb-mainline/gdb/gdbserver/server.c:2158:32: error: variable 'status' set but not used [-Werror=unused-but-set-variable] Tested on X86-64 native build. No regressions. -- Yao Qi CodeSourcery yao@codesourcery.com (650) 331-3385 x739 --------------030203030107000401090605 Content-Type: text/x-patch; name="werror.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="werror.patch" Content-length: 3815 gdbserver/ 2010-09-02 Yao Qi * linux-low.c (linux_kill): Remove unused variable. (linux_fast_tracepoint_collecting): Likewise. (linux_stabilize_threads): Likewise. * server.c (start_inferior): Likewise. (queue_stop_reply_callback): Likewise. * tracepoint.c (do_action_at_tracepoint): Likewise. Index: gdbserver/linux-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v retrieving revision 1.162 diff -u -p -r1.162 linux-low.c --- gdbserver/linux-low.c 1 Sep 2010 01:53:43 -0000 1.162 +++ gdbserver/linux-low.c 2 Sep 2010 08:50:09 -0000 @@ -775,7 +775,6 @@ linux_kill (int pid) { struct process_info *process; struct lwp_info *lwp; - struct thread_info *thread; int wstat; int lwpid; @@ -792,7 +791,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", @@ -1201,9 +1199,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 @@ -1932,13 +1927,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: gdbserver/server.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/server.c,v retrieving revision 1.132 diff -u -p -r1.132 server.c --- gdbserver/server.c 1 Sep 2010 17:29:32 -0000 1.132 +++ gdbserver/server.c 2 Sep 2010 08:50:09 -0000 @@ -273,13 +273,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; @@ -2155,11 +2154,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: gdbserver/tracepoint.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/tracepoint.c,v retrieving revision 1.11 diff -u -p -r1.11 tracepoint.c --- gdbserver/tracepoint.c 1 Sep 2010 17:29:32 -0000 1.11 +++ gdbserver/tracepoint.c 2 Sep 2010 08:50:09 -0000 @@ -4126,13 +4126,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"); --------------030203030107000401090605--