This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] cleanup: Wunused target.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]