This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 052/238] [index] linespec.c: -Wshadow fix
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Cc: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- Date: Mon, 12 Dec 2011 19:38:55 -0800
- Subject: [PATCH 052/238] [index] linespec.c: -Wshadow fix
- References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
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