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


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

diff --git a/gdb/linespec.c b/gdb/linespec.c
index 64ba837..450a340 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1994,7 +1994,7 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
 	       struct linespec_result *canonical, struct symtab *file_symtab)
 {
   LONGEST valx;
-  int index = 0;
+  int idx = 0;
   int need_canonical = 0;
   struct symtabs_and_lines values;
   struct symtab_and_line val;
@@ -2010,8 +2010,8 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
       /* We have a value history reference.  */
       struct value *val_history;
 
-      sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
-      val_history = access_value_history ((copy[1] == '$') ? -index : index);
+      sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &idx);
+      val_history = access_value_history ((copy[1] == '$') ? -idx : idx);
       if (TYPE_CODE (value_type (val_history)) != TYPE_CODE_INT)
 	error (_("History values used in line "
 		 "specs must have integer values."));
-- 
1.7.5.4


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