From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15518 invoked by alias); 13 Dec 2011 03:47:05 -0000 Received: (qmail 15503 invoked by uid 22791); 13 Dec 2011 03:47:04 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KAM_STOCKTIP,RCVD_IN_DNSWL_LOW,TW_BJ 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:46:51 +0000 Received: by mail-iy0-f169.google.com with SMTP id k25so11429116iah.0 for ; Mon, 12 Dec 2011 19:46:51 -0800 (PST) Received: by 10.43.53.1 with SMTP id vo1mr15318990icb.2.1323747682598; Mon, 12 Dec 2011 19:41:22 -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.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 19:41:22 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Cc: Andrey Smirnov Subject: [PATCH 054/238] [index] stabsread.c: -Wshadow fix Date: Tue, 13 Dec 2011 03:47:00 -0000 Message-Id: <1323747545-29987-20-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/msg00379.txt.bz2 To ChangeLog: * stabsread.c (dbx_lookup_type): Rename `index' to `idx'(-Wshadow). --- gdb/stabsread.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/stabsread.c b/gdb/stabsread.c index bb51808..4fd458d 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -222,7 +222,7 @@ static struct type ** dbx_lookup_type (int typenums[2], struct objfile *objfile) { int filenum = typenums[0]; - int index = typenums[1]; + int idx = typenums[1]; unsigned old_len; int real_filenum; struct header_file *f; @@ -236,13 +236,13 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) complaint (&symfile_complaints, _("Invalid symbol data: type number " "(%d,%d) out of range at symtab pos %d."), - filenum, index, symnum); + filenum, idx, symnum); goto error_return; } if (filenum == 0) { - if (index < 0) + if (idx < 0) { /* Caller wants address of address of type. We think that negative (rs6k builtin) types will never appear as @@ -251,13 +251,13 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) this will do the right thing. */ static struct type *temp_type; - temp_type = rs6000_builtin_type (index, objfile); + temp_type = rs6000_builtin_type (idx, objfile); return &temp_type; } /* Type is defined outside of header files. Find it in this object file's type vector. */ - if (index >= type_vector_length) + if (idx >= type_vector_length) { old_len = type_vector_length; if (old_len == 0) @@ -266,7 +266,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) type_vector = (struct type **) xmalloc (type_vector_length * sizeof (struct type *)); } - while (index >= type_vector_length) + while (idx >= type_vector_length) { type_vector_length *= 2; } @@ -276,7 +276,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) memset (&type_vector[old_len], 0, (type_vector_length - old_len) * sizeof (struct type *)); } - return (&type_vector[index]); + return (&type_vector[idx]); } else { @@ -296,9 +296,9 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) f = HEADER_FILES (objfile) + real_filenum; f_orig_length = f->length; - if (index >= f_orig_length) + if (idx >= f_orig_length) { - while (index >= f->length) + while (idx >= f->length) { f->length *= 2; } @@ -307,7 +307,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfile) memset (&f->vector[f_orig_length], 0, (f->length - f_orig_length) * sizeof (struct type *)); } - return (&f->vector[index]); + return (&f->vector[idx]); } } -- 1.7.5.4