From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8928 invoked by alias); 13 Dec 2011 03:41:18 -0000 Received: (qmail 8868 invoked by uid 22791); 13 Dec 2011 03:41:16 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 03:41:02 +0000 Received: by ggni2 with SMTP id i2so7693164ggn.0 for ; Mon, 12 Dec 2011 19:41:01 -0800 (PST) Received: by 10.50.12.161 with SMTP id z1mr17471050igb.85.1323747661207; Mon, 12 Dec 2011 19:41:01 -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.00 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:01 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 040/238] [index] f-valprint.c -Wshadow fix Date: Tue, 13 Dec 2011 03:46:00 -0000 Message-Id: <1323747545-29987-6-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/msg00376.txt.bz2 To ChangeLog: * f-valprint.c (f_val_print): Rename `index' to `idx'(-Wshadow). --- gdb/f-valprint.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index b800d89..f7fbeac 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -258,7 +258,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, struct type *elttype; LONGEST val; CORE_ADDR addr; - int index; + int idx; CHECK_TYPEDEF (type); switch (TYPE_CODE (type)) @@ -496,15 +496,15 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, /* Starting from the Fortran 90 standard, Fortran supports derived types. */ fprintf_filtered (stream, "( "); - for (index = 0; index < TYPE_NFIELDS (type); index++) + for (idx = 0; idx < TYPE_NFIELDS (type); idx++) { - int offset = TYPE_FIELD_BITPOS (type, index) / 8; + int offset = TYPE_FIELD_BITPOS (type, idx) / 8; - val_print (TYPE_FIELD_TYPE (type, index), valaddr, + val_print (TYPE_FIELD_TYPE (type, idx), valaddr, embedded_offset + offset, address, stream, recurse + 1, original_value, options, current_language); - if (index != TYPE_NFIELDS (type) - 1) + if (idx != TYPE_NFIELDS (type) - 1) fputs_filtered (", ", stream); } fprintf_filtered (stream, " )"); -- 1.7.5.4