From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18098 invoked by alias); 13 Dec 2011 03:49:06 -0000 Received: (qmail 18090 invoked by uid 22791); 13 Dec 2011 03:49:05 -0000 X-SWARE-Spam-Status: No, hits=-2.6 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-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 03:48:53 +0000 Received: by iahk25 with SMTP id k25so11432109iah.0 for ; Mon, 12 Dec 2011 19:48:52 -0800 (PST) Received: by 10.42.136.137 with SMTP id u9mr11334729ict.50.1323747686504; Mon, 12 Dec 2011 19:41:26 -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.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:26 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 059/238] [index] value.c: -Wshadow fix Date: Tue, 13 Dec 2011 03:49:00 -0000 Message-Id: <1323747545-29987-25-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/msg00387.txt.bz2 To ChangeLog: * value.c (value_from_history_ref): Rename `index' to `idx'(-Wshadow). --- gdb/value.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/value.c b/gdb/value.c index d263d0c..39b1e3a 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3045,7 +3045,7 @@ value_from_decfloat (struct type *type, const gdb_byte *dec) struct value * value_from_history_ref (char *h, char **endp) { - int index, len; + int idx, len; if (h[0] == '$') len = 1; @@ -3070,25 +3070,25 @@ value_from_history_ref (char *h, char **endp) { /* For some bizarre reason, "$$" is equivalent to "$$1", rather than to "$$0" as it ought to be! */ - index = -1; + idx = -1; *endp += len; } else - index = -strtol (&h[2], endp, 10); + idx = -strtol (&h[2], endp, 10); } else { if (len == 1) { /* "$" is equivalent to "$0". */ - index = 0; + idx = 0; *endp += len; } else - index = strtol (&h[1], endp, 10); + idx = strtol (&h[1], endp, 10); } - return access_value_history (index); + return access_value_history (idx); } struct value * -- 1.7.5.4