[PATCH 049/238] [index] completer.c: -Wshadow fix

Andrey Smirnov andrew.smirnov@gmail.com
Tue Dec 13 03:41:00 GMT 2011


To ChangeLog:
	* completer.c (line_completion_function): Rename `index' to
	`idx'(-Wshadow).
---
 gdb/completer.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/completer.c b/gdb/completer.c
index 606f78b..55a4b7a 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -863,7 +863,7 @@ line_completion_function (const char *text, int matches,
 			  char *line_buffer, int point)
 {
   static char **list = (char **) NULL;	/* Cache of completions.  */
-  static int index;			/* Next cached completion.  */
+  static int idx;			/* Next cached completion.  */
   char *output = NULL;
 
   if (matches == 0)
@@ -881,7 +881,7 @@ line_completion_function (const char *text, int matches,
 	  xfree (list);
 	  list = NULL;
 	}
-      index = 0;
+      idx = 0;
       list = complete_line (text, line_buffer, point);
     }
 
@@ -893,10 +893,10 @@ line_completion_function (const char *text, int matches,
 
   if (list)
     {
-      output = list[index];
+      output = list[idx];
       if (output)
 	{
-	  index++;
+	  idx++;
 	}
     }
 
-- 
1.7.5.4



More information about the Gdb-patches mailing list