This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 058/238] [index] valops.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:01 -0800
- Subject: [PATCH 058/238] [index] valops.c: -Wshadow fix
- References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
To ChangeLog:
* valops.c (oload_method_static): Rename `index' to `idx'(-Wshadow).
(maybe_print_array_index): Ditto.
---
gdb/valops.c | 6 +++---
gdb/valprint.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gdb/valops.c b/gdb/valops.c
index 29d1fbd..6ce91d2 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3076,10 +3076,10 @@ find_oload_champ (struct value **args, int nargs, int method,
a non-static method or a function that isn't a method. */
static int
-oload_method_static (int method, struct fn_field *fns_ptr, int index)
+oload_method_static (int method, struct fn_field *fns_ptr, int idx)
{
- if (method && fns_ptr && index >= 0
- && TYPE_FN_FIELD_STATIC_P (fns_ptr, index))
+ if (method && fns_ptr && idx >= 0
+ && TYPE_FN_FIELD_STATIC_P (fns_ptr, idx))
return 1;
else
return 0;
diff --git a/gdb/valprint.c b/gdb/valprint.c
index b4ac4ec..79fb032 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1167,7 +1167,7 @@ print_char_chars (struct ui_file *stream, struct type *type,
at INDEX of an array whose index type is INDEX_TYPE. */
void
-maybe_print_array_index (struct type *index_type, LONGEST index,
+maybe_print_array_index (struct type *index_type, LONGEST idx,
struct ui_file *stream,
const struct value_print_options *options)
{
@@ -1176,7 +1176,7 @@ maybe_print_array_index (struct type *index_type, LONGEST index,
if (!options->print_array_indexes)
return;
- index_value = value_from_longest (index_type, index);
+ index_value = value_from_longest (index_type, idx);
LA_PRINT_ARRAY_INDEX (index_value, stream, options);
}
--
1.7.5.4