From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4829 invoked by alias); 22 Nov 2011 13:25:33 -0000 Received: (qmail 4710 invoked by uid 22791); 22 Nov 2011 13:25:31 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Nov 2011 13:25:20 +0000 Received: by faas10 with SMTP id s10so481964faa.0 for ; Tue, 22 Nov 2011 05:25:19 -0800 (PST) Received: by 10.205.120.20 with SMTP id fw20mr19544594bkc.39.1321968319180; Tue, 22 Nov 2011 05:25:19 -0800 (PST) Received: from bulbasaur (l49-9-169.cn.ru. [178.49.9.169]) by mx.google.com with ESMTPS id z7sm10092369bka.1.2011.11.22.05.25.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Nov 2011 05:25:18 -0800 (PST) From: Andrey Smirnov To: gdb-patches@sourceware.org Subject: [PATCH 35/358] Fix -Wsahdow warnings Date: Tue, 22 Nov 2011 13:25:00 -0000 Message-ID: <87obw470hx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/x-diff Content-Disposition: inline; filename=0034-Fix-Wshadow-warnings.patch Content-Description: Fix -Wshadow warnings 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-11/txt/msg00572.txt.bz2 >From b831dfc1178c4501532af794a6a841886ee10b06 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 22 Nov 2011 17:59:24 +0700 Subject: [PATCH 34/39] Fix -Wshadow warnings. * breakpoint.c (update_static_tracepoint): Fix -Wshadow warnings. --- gdb/ChangeLog | 5 +++++ gdb/breakpoint.c | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 77bff37..a99830f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2011-11-22 Andrey Smirnov + * breakpoint.c (update_static_tracepoint): Fix -Wshadow + warnings. + +2011-11-22 Andrey Smirnov + * breakpoint.c (update_global_location_list): Fix -Wshadow warnings. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index cba4d3e..9a7f132 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -11640,26 +11640,26 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal) if (!VEC_empty(static_tracepoint_marker_p, markers)) { - struct symtab_and_line sal; + struct symtab_and_line las; struct symbol *sym; - struct static_tracepoint_marker *marker; + struct static_tracepoint_marker *tpmarker; struct ui_out *uiout = current_uiout; - marker = VEC_index (static_tracepoint_marker_p, markers, 0); + tpmarker = VEC_index (static_tracepoint_marker_p, markers, 0); xfree (tp->static_trace_marker_id); - tp->static_trace_marker_id = xstrdup (marker->str_id); + tp->static_trace_marker_id = xstrdup (tpmarker->str_id); warning (_("marker for static tracepoint %d (%s) not " "found at previous line number"), b->number, tp->static_trace_marker_id); - init_sal (&sal); + init_sal (&las); - sal.pc = marker->address; + las.pc = tpmarker->address; - sal = find_pc_line (marker->address, 0); - sym = find_pc_sect_function (marker->address, NULL); + las = find_pc_line (tpmarker->address, 0); + sym = find_pc_sect_function (tpmarker->address, NULL); ui_out_text (uiout, "Now in "); if (sym) { @@ -11667,36 +11667,36 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal) SYMBOL_PRINT_NAME (sym)); ui_out_text (uiout, " at "); } - ui_out_field_string (uiout, "file", sal.symtab->filename); + ui_out_field_string (uiout, "file", las.symtab->filename); ui_out_text (uiout, ":"); if (ui_out_is_mi_like_p (uiout)) { - char *fullname = symtab_to_fullname (sal.symtab); + char *fullname = symtab_to_fullname (las.symtab); if (fullname) ui_out_field_string (uiout, "fullname", fullname); } - ui_out_field_int (uiout, "line", sal.line); + ui_out_field_int (uiout, "line", las.line); ui_out_text (uiout, "\n"); - b->line_number = sal.line; + b->line_number = las.line; xfree (b->source_file); if (sym) - b->source_file = xstrdup (sal.symtab->filename); + b->source_file = xstrdup (las.symtab->filename); else b->source_file = NULL; xfree (b->addr_string); b->addr_string = xstrprintf ("%s:%d", - sal.symtab->filename, b->line_number); + las.symtab->filename, b->line_number); /* Might be nice to check if function changed, and warn if so. */ - release_static_tracepoint_marker (marker); + release_static_tracepoint_marker (tpmarker); } } return sal; -- 1.7.5.4