Fix the [-Werror=shadow=local] warning

Rename local variable in value_struct_elt_for_reference()
to work around the shadowing a previous local warning.
This commit is contained in:
Weimin Pan 2018-10-08 22:14:11 +00:00
parent 74792ff782
commit a51bb70c8a
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2018-10-08 Weimin Pan <weimin.pan@oracle.com>
* valops.c (value_struct_elt_for_reference): Rename local variable
to work around the shadowing a previous local warning.
2018-10-08 John Baldwin <jhb@FreeBSD.org>
* Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.

View File

@ -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;
}