[patch] cleanup: Wunused target.c

Aleksandar Ristovski
2013-01-31T04:25:53Z

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

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.

[-- Attachment #2: Wunused-target-201301302122.patch --]
[-- Type: text/x-patch, Size: 751 bytes --]

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));