From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14561 invoked by alias); 13 Dec 2011 03:46:49 -0000 Received: (qmail 14552 invoked by uid 22791); 13 Dec 2011 03:46:48 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gy0-f169.google.com (HELO mail-gy0-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 03:46:32 +0000 Received: by ghrr13 with SMTP id r13so48876ghr.0 for ; Mon, 12 Dec 2011 19:46:32 -0800 (PST) Received: by 10.50.237.5 with SMTP id uy5mr17631569igc.50.1323747680195; Mon, 12 Dec 2011 19:41:20 -0800 (PST) Received: from localhost.localdomain (c-24-18-115-186.hsd1.wa.comcast.net. [24.18.115.186]) by mx.google.com with ESMTPS id e2sm81168651ibe.0.2011.12.12.19.41.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:19 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 051/238] [index] gnu-v3-abi.c: -Wshadow fix Date: Tue, 13 Dec 2011 03:46:00 -0000 Message-Id: <1323747545-29987-17-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com> References: <1323747545-29987-1-git-send-email-andrew.smirnov@gmail.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00377.txt.bz2 * 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