This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] cleanup: Wunused target.c
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 30 Jan 2013 23:25:40 -0500
- Subject: [patch] cleanup: Wunused target.c
- Newsgroups: gmane.comp.gdb.patches
Hello,
This is removing unused variables and allows compiling with -Wunused.
Thanks,
Aleksandar Ristovski
QNX Software Systems
ChangeLog:
Aleksandar Ristovski <aristovski@qnx.com>
* target.c (target_read_string): Remove unused ORIGLEN.
Index: gdb/target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.318
diff -u -p -r1.318 target.c
--- gdb/target.c 1 Jan 2013 06:32:52 -0000 1.318
+++ gdb/target.c 30 Jan 2013 22:25:16 -0000
@@ -1220,7 +1220,7 @@ target_translate_tls_address (struct obj
int
target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop)
{
- int tlen, origlen, offset, i;
+ int tlen, offset, i;
gdb_byte buf[4];
int errcode = 0;
char *buffer;
@@ -1235,8 +1235,6 @@ target_read_string (CORE_ADDR memaddr, c
buffer = xmalloc (buffer_allocated);
bufptr = buffer;
- origlen = len;
-
while (len > 0)
{
tlen = MIN (len, 4 - (memaddr & 3));