This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 051/238] [index] gnu-v3-abi.c: -Wshadow fix


* gnu-v3-abi.c (gnuv3_baseclass_offset): Rename `index' to `idx'(-Wshadow).
---
 gdb/gnu-v3-abi.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 92b73d3..beea2d7 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -415,7 +415,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
    -1 is returned on error.  */
 
 static int
-gnuv3_baseclass_offset (struct type *type, int index,
+gnuv3_baseclass_offset (struct type *type, int idx,
 			const bfd_byte *valaddr, int embedded_offset,
 			CORE_ADDR address, const struct value *val)
 {
@@ -431,15 +431,15 @@ gnuv3_baseclass_offset (struct type *type, int index,
 
   /* If it isn't a virtual base, this is easy.  The offset is in the
      type definition.  */
-  if (!BASETYPE_VIA_VIRTUAL (type, index))
-    return TYPE_BASECLASS_BITPOS (type, index) / 8;
+  if (!BASETYPE_VIA_VIRTUAL (type, idx))
+    return TYPE_BASECLASS_BITPOS (type, idx) / 8;
 
   /* To access a virtual base, we need to use the vbase offset stored in
      our vtable.  Recent GCC versions provide this information.  If it isn't
      available, we could get what we needed from RTTI, or from drawing the
      complete inheritance graph based on the debug info.  Neither is
      worthwhile.  */
-  cur_base_offset = TYPE_BASECLASS_BITPOS (type, index) / 8;
+  cur_base_offset = TYPE_BASECLASS_BITPOS (type, idx) / 8;
   if (cur_base_offset >= - vtable_address_point_offset (gdbarch))
     error (_("Expected a negative vbase offset (old compiler?)"));
 
-- 
1.7.5.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]