From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17745 invoked by alias); 13 Dec 2011 03:48:55 -0000 Received: (qmail 17732 invoked by uid 22791); 13 Dec 2011 03:48:54 -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:42 +0000 Received: by mail-iy0-f169.google.com with SMTP id k25so11431337iah.0 for ; Mon, 12 Dec 2011 19:48:41 -0800 (PST) Received: by 10.42.151.195 with SMTP id f3mr9634697icw.19.1323747688620; Mon, 12 Dec 2011 19:41:28 -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.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:28 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 062/238] [index] mi/mi-cmds.c: -Wshadow fix Date: Tue, 13 Dec 2011 03:49:00 -0000 Message-Id: <1323747545-29987-28-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/msg00386.txt.bz2 To ChangeLog: * mi/mi-cmds.c (varobj_update_one): Rename `index' to `idx'(-Wshadow). --- gdb/mi/mi-cmds.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index 960d2dc..9355a3c 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -171,18 +171,18 @@ static struct mi_cmd ** lookup_table (const char *command) { const char *chp; - unsigned int index = 0; + unsigned int idx = 0; /* compute our hash */ for (chp = command; *chp; chp++) { /* some what arbitrary */ - index = ((index << 6) + (unsigned int) *chp) % MI_TABLE_SIZE; + idx = ((idx << 6) + (unsigned int) *chp) % MI_TABLE_SIZE; } /* look it up */ while (1) { - struct mi_cmd **entry = &mi_table[index]; + struct mi_cmd **entry = &mi_table[idx]; if ((*entry) == 0) { /* not found, return pointer to next free. */ @@ -194,7 +194,7 @@ lookup_table (const char *command) stats.hit++; return entry; /* found */ } - index = (index + 1) % MI_TABLE_SIZE; + idx = (idx + 1) % MI_TABLE_SIZE; stats.rehash++; } } -- 1.7.5.4