From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18801 invoked by alias); 13 Dec 2011 03:49:59 -0000 Received: (qmail 18793 invoked by uid 22791); 13 Dec 2011 03:49:58 -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:49:33 +0000 Received: by mail-iy0-f169.google.com with SMTP id k25so11432109iah.0 for ; Mon, 12 Dec 2011 19:49:33 -0800 (PST) Received: by 10.50.149.162 with SMTP id ub2mr17590394igb.70.1323747680883; 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.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:20 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 052/238] [index] linespec.c: -Wshadow fix Date: Tue, 13 Dec 2011 07:18:00 -0000 Message-Id: <1323747545-29987-18-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/msg00389.txt.bz2 To ChangeLog: * linespec.c (decode_dollar): rename `index' to `idx'(-Wshadow). --- gdb/linespec.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/linespec.c b/gdb/linespec.c index 64ba837..450a340 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1994,7 +1994,7 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, struct linespec_result *canonical, struct symtab *file_symtab) { LONGEST valx; - int index = 0; + int idx = 0; int need_canonical = 0; struct symtabs_and_lines values; struct symtab_and_line val; @@ -2010,8 +2010,8 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, /* We have a value history reference. */ struct value *val_history; - sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index); - val_history = access_value_history ((copy[1] == '$') ? -index : index); + sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &idx); + val_history = access_value_history ((copy[1] == '$') ? -idx : idx); if (TYPE_CODE (value_type (val_history)) != TYPE_CODE_INT) error (_("History values used in line " "specs must have integer values.")); -- 1.7.5.4