From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27977 invoked by alias); 9 May 2013 18:52:45 -0000 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 Received: (qmail 27949 invoked by uid 89); 9 May 2013 18:52:45 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 09 May 2013 18:52:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r49Iqhxq008933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 May 2013 14:52:43 -0400 Received: from barimba (ovpn-113-133.phx2.redhat.com [10.3.113.133]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r49IqfKF015751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 9 May 2013 14:52:42 -0400 From: Tom Tromey From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 33/40] fix mi-cmd-stack.c In-Reply-To: References: Message-Id: Date: Thu, 09 May 2013 18:52:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00347.txt.bz2 mi-cmd-stack.d had a conditional cleanup, "cleanup_tuple" that confused the checker. However, there was no need for this, since it was only used via do_cleanups at the end of the function, just before another call to do_cleanups. So, while this is a stylistic patch for the checker, I also consider it a generic improvement for readers of the code. * mi/mi-cmd-stack.c (list_arg_or_local): Remove "cleanup_tuple". --- gdb/mi/mi-cmd-stack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 062cd5d..4de78ac 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -250,7 +250,6 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what, enum print_values values) { struct cleanup *old_chain; - struct cleanup *cleanup_tuple = NULL; struct ui_out *uiout = current_uiout; struct ui_file *stb; @@ -268,7 +267,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what, && (arg->val || arg->error))); if (values != PRINT_NO_VALUES || what == all) - cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); + make_cleanup_ui_out_tuple_begin_end (uiout, NULL); fputs_filtered (SYMBOL_PRINT_NAME (arg->sym), stb); if (arg->entry_kind == print_entry_values_only) @@ -311,8 +310,6 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what, ui_out_field_stream (uiout, "value", stb); } - if (values != PRINT_NO_VALUES || what == all) - do_cleanups (cleanup_tuple); do_cleanups (old_chain); } -- 1.8.1.4