This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] ada-lang.c, inner variable shadows function param.
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 01 Mar 2011 14:43:58 -0800
- Subject: [commit] ada-lang.c, inner variable shadows function param.
checked in.
2011-03-01 Michael Snyder <msnyder@vmware.com>
* ada-lang.c (aggregate_assign_others): Rename inner scope variable
which shadows function parameter.
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.285
diff -u -p -u -p -r1.285 ada-lang.c
--- ada-lang.c 17 Feb 2011 06:42:56 -0000 1.285
+++ ada-lang.c 1 Mar 2011 22:41:03 -0000
@@ -8717,7 +8717,7 @@ aggregate_assign_others (struct value *c
LONGEST low, LONGEST high)
{
int i;
- int expr_pc = *pos+1;
+ int expr_pc = *pos + 1;
for (i = 0; i < num_indices - 2; i += 2)
{
@@ -8725,10 +8725,10 @@ aggregate_assign_others (struct value *c
for (ind = indices[i + 1] + 1; ind < indices[i + 2]; ind += 1)
{
- int pos;
+ int localpos;
- pos = expr_pc;
- assign_component (container, lhs, ind, exp, &pos);
+ localpos = expr_pc;
+ assign_component (container, lhs, ind, exp, &localpos);
}
}
ada_evaluate_subexp (NULL, exp, pos, EVAL_SKIP);