This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 055/238] [index] symmisc.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:58 -0800
- Subject: [PATCH 055/238] [index] symmisc.c: -Wshadow fix
- References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
To ChangeLog:
* symmisc.c (dump_msymbols): Rename `index' to `idx'(-Wshadow).
---
gdb/symmisc.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 117a22b..b3bd2ed 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -203,7 +203,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct minimal_symbol *msymbol;
- int index;
+ int idx;
char ms_type;
fprintf_filtered (outfile, "\nObject file %s:\n\n", objfile->name);
@@ -212,7 +212,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
fprintf_filtered (outfile, "No minimal symbols found.\n");
return;
}
- index = 0;
+ idx = 0;
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
{
struct obj_section *section = SYMBOL_OBJ_SECTION (msymbol);
@@ -253,7 +253,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
ms_type = '?';
break;
}
- fprintf_filtered (outfile, "[%2d] %c ", index, ms_type);
+ fprintf_filtered (outfile, "[%2d] %c ", idx, ms_type);
fputs_filtered (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (msymbol)),
outfile);
fprintf_filtered (outfile, " %s", SYMBOL_LINKAGE_NAME (msymbol));
@@ -268,12 +268,12 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
if (msymbol->filename)
fprintf_filtered (outfile, " %s", msymbol->filename);
fputs_filtered ("\n", outfile);
- index++;
+ idx++;
}
- if (objfile->minimal_symbol_count != index)
+ if (objfile->minimal_symbol_count != idx)
{
warning (_("internal error: minimal symbol count %d != %d"),
- objfile->minimal_symbol_count, index);
+ objfile->minimal_symbol_count, idx);
}
fprintf_filtered (outfile, "\n");
}
--
1.7.5.4