aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorWeimin Pan <weimin.pan@oracle.com>2018-10-08 22:14:11 +0000
committerWeimin Pan <weimin.pan@oracle.com>2018-10-08 22:14:11 +0000
commita51bb70c8a1570f2e6fa74432578bcdf7f2785aa (patch)
treef226e87b56b784c23d88c25b8fb722bf0a23d619 /gdb/valops.c
parent74792ff782431ec6113b9a8a8e85b95f46094c7f (diff)
downloadgdb-a51bb70c8a1570f2e6fa74432578bcdf7f2785aa.zip
gdb-a51bb70c8a1570f2e6fa74432578bcdf7f2785aa.tar.gz
gdb-a51bb70c8a1570f2e6fa74432578bcdf7f2785aa.tar.bz2
Fix the [-Werror=shadow=local] warning
Rename local variable in value_struct_elt_for_reference() to work around the shadowing a previous local warning.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 99b1275..c45caef 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -3439,9 +3439,9 @@ value_struct_elt_for_reference (struct type *domain, int offset,
mem_offset += boff;
else
{
- struct type *t = check_typedef (value_type (this_v));
- t = check_typedef (TYPE_TARGET_TYPE (t));
- if (get_baseclass_offset (t, curtype, this_v,
+ struct type *p = check_typedef (value_type (this_v));
+ p = check_typedef (TYPE_TARGET_TYPE (p));
+ if (get_baseclass_offset (p, curtype, this_v,
&boff, &isvirt))
mem_offset += boff;
}