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 062/238] [index] mi/mi-cmds.c: -Wshadow fix


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

diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 960d2dc..9355a3c 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -171,18 +171,18 @@ static struct mi_cmd **
 lookup_table (const char *command)
 {
   const char *chp;
-  unsigned int index = 0;
+  unsigned int idx = 0;
 
   /* compute our hash */
   for (chp = command; *chp; chp++)
     {
       /* some what arbitrary */
-      index = ((index << 6) + (unsigned int) *chp) % MI_TABLE_SIZE;
+      idx = ((idx << 6) + (unsigned int) *chp) % MI_TABLE_SIZE;
     }
   /* look it up */
   while (1)
     {
-      struct mi_cmd **entry = &mi_table[index];
+      struct mi_cmd **entry = &mi_table[idx];
       if ((*entry) == 0)
 	{
 	  /* not found, return pointer to next free. */
@@ -194,7 +194,7 @@ lookup_table (const char *command)
 	  stats.hit++;
 	  return entry;		/* found */
 	}
-      index = (index + 1) % MI_TABLE_SIZE;
+      idx = (idx + 1) % MI_TABLE_SIZE;
       stats.rehash++;
     }
 }
-- 
1.7.5.4


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