From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: gdb-patches@sourceware.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 054/238] [index] stabsread.c: -Wshadow fix
Date: Tue, 13 Dec 2011 03:47:00 -0000 [thread overview]
Message-ID: <1323747545-29987-20-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com>
To ChangeLog:
* stabsread.c (dbx_lookup_type): Rename `index' to `idx'(-Wshadow).
---
gdb/stabsread.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index bb51808..4fd458d 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -222,7 +222,7 @@ static struct type **
dbx_lookup_type (int typenums[2], struct objfile *objfile)
{
int filenum = typenums[0];
- int index = typenums[1];
+ int idx = typenums[1];
unsigned old_len;
int real_filenum;
struct header_file *f;
@@ -236,13 +236,13 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
complaint (&symfile_complaints,
_("Invalid symbol data: type number "
"(%d,%d) out of range at symtab pos %d."),
- filenum, index, symnum);
+ filenum, idx, symnum);
goto error_return;
}
if (filenum == 0)
{
- if (index < 0)
+ if (idx < 0)
{
/* Caller wants address of address of type. We think
that negative (rs6k builtin) types will never appear as
@@ -251,13 +251,13 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
this will do the right thing. */
static struct type *temp_type;
- temp_type = rs6000_builtin_type (index, objfile);
+ temp_type = rs6000_builtin_type (idx, objfile);
return &temp_type;
}
/* Type is defined outside of header files.
Find it in this object file's type vector. */
- if (index >= type_vector_length)
+ if (idx >= type_vector_length)
{
old_len = type_vector_length;
if (old_len == 0)
@@ -266,7 +266,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
type_vector = (struct type **)
xmalloc (type_vector_length * sizeof (struct type *));
}
- while (index >= type_vector_length)
+ while (idx >= type_vector_length)
{
type_vector_length *= 2;
}
@@ -276,7 +276,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
memset (&type_vector[old_len], 0,
(type_vector_length - old_len) * sizeof (struct type *));
}
- return (&type_vector[index]);
+ return (&type_vector[idx]);
}
else
{
@@ -296,9 +296,9 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
f = HEADER_FILES (objfile) + real_filenum;
f_orig_length = f->length;
- if (index >= f_orig_length)
+ if (idx >= f_orig_length)
{
- while (index >= f->length)
+ while (idx >= f->length)
{
f->length *= 2;
}
@@ -307,7 +307,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile)
memset (&f->vector[f_orig_length], 0,
(f->length - f_orig_length) * sizeof (struct type *));
}
- return (&f->vector[index]);
+ return (&f->vector[idx]);
}
}
--
1.7.5.4
next prev parent reply other threads:[~2011-12-13 3:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 3:41 [PATCH 035/238] [index] python/py-evtregistry.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 039/238] [index] findcmd.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 036/238] [index] i386-tdep.c: " Andrey Smirnov
2011-12-13 8:17 ` Mark Kettenis
2011-12-13 12:36 ` Eli Zaretskii
2011-12-13 16:47 ` Mark Kettenis
2011-12-13 3:41 ` [PATCH 047/238] [index] cp-support.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 049/238] [index] completer.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 056/238] [index] symtab.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 042/238] [index] exec.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 037/238] [index] gnu-v2-abi.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 048/238] [index] cp-abi.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 043/238] [index] eval.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 038/238] [index] gdbtypes.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 045/238] [index] dwarf2read.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 041/238] [index] f-typeprint.c: " Andrey Smirnov
2011-12-13 3:41 ` [PATCH 058/238] [index] valops.c: " Andrey Smirnov
2011-12-13 3:46 ` [PATCH 040/238] [index] f-valprint.c " Andrey Smirnov
2011-12-13 3:46 ` [PATCH 051/238] [index] gnu-v3-abi.c: " Andrey Smirnov
2011-12-13 3:47 ` [PATCH 050/238] [index] coffread.c: " Andrey Smirnov
2011-12-13 3:47 ` [PATCH 057/238] [index] valarith.c: " Andrey Smirnov
2011-12-13 3:47 ` Andrey Smirnov [this message]
2011-12-13 3:47 ` [PATCH 044/238] [index] dwarf2read.c: " Andrey Smirnov
2011-12-13 3:47 ` [PATCH 060/238] [index] varobj.c: " Andrey Smirnov
2011-12-13 3:47 ` [PATCH 053/238] [index] parse.c: " Andrey Smirnov
2011-12-13 3:48 ` [PATCH 046/238] [index] dcache.c: " Andrey Smirnov
2011-12-13 3:48 ` [PATCH 061/238] [index] wrapper.c: " Andrey Smirnov
2011-12-13 3:49 ` [PATCH 059/238] [index] value.c: " Andrey Smirnov
2011-12-13 3:49 ` [PATCH 062/238] [index] mi/mi-cmds.c: " Andrey Smirnov
2011-12-13 3:49 ` [PATCH 055/238] [index] symmisc.c: " Andrey Smirnov
2011-12-13 7:18 ` [PATCH 052/238] [index] linespec.c: " Andrey Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323747545-29987-20-git-send-email-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox