From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11443 invoked by alias); 13 Dec 2011 03:41:40 -0000 Received: (qmail 11314 invoked by uid 22791); 13 Dec 2011 03:41:39 -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,TW_FN 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:41:26 +0000 Received: by mail-iy0-f169.google.com with SMTP id k25so11422557iah.0 for ; Mon, 12 Dec 2011 19:41:25 -0800 (PST) Received: by 10.50.182.199 with SMTP id eg7mr17390372igc.57.1323747685817; Mon, 12 Dec 2011 19:41:25 -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:25 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 058/238] [index] valops.c: -Wshadow fix Date: Tue, 13 Dec 2011 03:41:00 -0000 Message-Id: <1323747545-29987-24-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/msg00371.txt.bz2 To ChangeLog: * valops.c (oload_method_static): Rename `index' to `idx'(-Wshadow). (maybe_print_array_index): Ditto. --- gdb/valops.c | 6 +++--- gdb/valprint.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gdb/valops.c b/gdb/valops.c index 29d1fbd..6ce91d2 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3076,10 +3076,10 @@ find_oload_champ (struct value **args, int nargs, int method, a non-static method or a function that isn't a method. */ static int -oload_method_static (int method, struct fn_field *fns_ptr, int index) +oload_method_static (int method, struct fn_field *fns_ptr, int idx) { - if (method && fns_ptr && index >= 0 - && TYPE_FN_FIELD_STATIC_P (fns_ptr, index)) + if (method && fns_ptr && idx >= 0 + && TYPE_FN_FIELD_STATIC_P (fns_ptr, idx)) return 1; else return 0; diff --git a/gdb/valprint.c b/gdb/valprint.c index b4ac4ec..79fb032 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1167,7 +1167,7 @@ print_char_chars (struct ui_file *stream, struct type *type, at INDEX of an array whose index type is INDEX_TYPE. */ void -maybe_print_array_index (struct type *index_type, LONGEST index, +maybe_print_array_index (struct type *index_type, LONGEST idx, struct ui_file *stream, const struct value_print_options *options) { @@ -1176,7 +1176,7 @@ maybe_print_array_index (struct type *index_type, LONGEST index, if (!options->print_array_indexes) return; - index_value = value_from_longest (index_type, index); + index_value = value_from_longest (index_type, idx); LA_PRINT_ARRAY_INDEX (index_value, stream, options); } -- 1.7.5.4