aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-01 22:42:33 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-01 22:42:33 +0000
commit5ce6495039d4449a0770331ab29d3d2dfe8bae71 (patch)
tree86a4abb341091697d453bbe3e32ea8c8b3588596
parenta0aa28782e9800c7e2ff19a4be977ba93f049297 (diff)
downloadgdb-5ce6495039d4449a0770331ab29d3d2dfe8bae71.zip
gdb-5ce6495039d4449a0770331ab29d3d2dfe8bae71.tar.gz
gdb-5ce6495039d4449a0770331ab29d3d2dfe8bae71.tar.bz2
2011-03-01 Michael Snyder <msnyder@vmware.com>
* ada-lang.c (aggregate_assign_others): Rename inner scope variable which shadows function parameter.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/ada-lang.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 65b9603..5be6dea 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2011-03-01 Michael Snyder <msnyder@vmware.com>
+ * ada-lang.c (aggregate_assign_others): Rename inner scope variable
+ which shadows function parameter.
+
* tracepoint.c (create_tsv_from_upload): Superfluous call
to xstrdup. Callee already calls xstrdup.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 467e4df..55b05f1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -8717,7 +8717,7 @@ aggregate_assign_others (struct value *container,
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 *container,
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);