From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [gdbserver] Remove unused variables
Date: Thu, 02 Sep 2010 14:00:00 -0000 [thread overview]
Message-ID: <4C7F7273.6090708@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
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
[-- Attachment #2: werror.patch --]
[-- Type: text/x-patch, Size: 3815 bytes --]
gdbserver/
2010-09-02 Yao Qi <yao@codesourcery.com>
* 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");
next reply other threads:[~2010-09-02 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 14:00 Yao Qi [this message]
2010-09-06 10:45 ` Pedro Alves
2010-09-06 15:22 ` Yao Qi
2010-09-06 15:49 ` Pedro Alves
2010-09-06 22:29 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C7F7273.6090708@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).