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 046/238] [index] dcache.c: -Wshadow fix


To ChangeLog:
	* dcache.c (dcache_print_line): Rename `index' to `idx'(-Wshadow).
---
 gdb/dcache.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/dcache.c b/gdb/dcache.c
index bcc7bf4..de0ca38 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -559,7 +559,7 @@ dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr, int len)
 }
 
 static void
-dcache_print_line (int index)
+dcache_print_line (int idx)
 {
   splay_tree_node n;
   struct dcache_block *db;
@@ -573,7 +573,7 @@ dcache_print_line (int index)
 
   n = splay_tree_min (last_cache->tree);
 
-  for (i = index; i > 0; --i)
+  for (i = idx; i > 0; --i)
     {
       if (!n)
 	break;
@@ -589,7 +589,7 @@ dcache_print_line (int index)
   db = (struct dcache_block *) n->value;
 
   printf_filtered (_("Line %d: address %s [%d hits]\n"),
-		   index, paddress (target_gdbarch, db->addr), db->refs);
+		   idx, paddress (target_gdbarch, db->addr), db->refs);
 
   for (j = 0; j < last_cache->line_size; j++)
     {
-- 
1.7.5.4


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