This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 059/238] [index] value.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:39:02 -0800
- Subject: [PATCH 059/238] [index] value.c: -Wshadow fix
- References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
To ChangeLog:
* value.c (value_from_history_ref): Rename `index' to `idx'(-Wshadow).
---
gdb/value.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/value.c b/gdb/value.c
index d263d0c..39b1e3a 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -3045,7 +3045,7 @@ value_from_decfloat (struct type *type, const gdb_byte *dec)
struct value *
value_from_history_ref (char *h, char **endp)
{
- int index, len;
+ int idx, len;
if (h[0] == '$')
len = 1;
@@ -3070,25 +3070,25 @@ value_from_history_ref (char *h, char **endp)
{
/* For some bizarre reason, "$$" is equivalent to "$$1",
rather than to "$$0" as it ought to be! */
- index = -1;
+ idx = -1;
*endp += len;
}
else
- index = -strtol (&h[2], endp, 10);
+ idx = -strtol (&h[2], endp, 10);
}
else
{
if (len == 1)
{
/* "$" is equivalent to "$0". */
- index = 0;
+ idx = 0;
*endp += len;
}
else
- index = strtol (&h[1], endp, 10);
+ idx = strtol (&h[1], endp, 10);
}
- return access_value_history (index);
+ return access_value_history (idx);
}
struct value *
--
1.7.5.4