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


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


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