From patchwork Wed May 3 22:46:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 20247 Received: (qmail 51787 invoked by alias); 3 May 2017 22:46:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 51610 invoked by uid 89); 3 May 2017 22:46:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1817 X-HELO: gproxy4.mail.unifiedlayer.com Received: from gproxy4-pub.mail.unifiedlayer.com (HELO gproxy4.mail.unifiedlayer.com) (69.89.23.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 22:46:34 +0000 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy4.mail.unifiedlayer.com (Postfix) with ESMTP id 466EB175E61 for ; Wed, 3 May 2017 16:46:35 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id FymY1v0062f2jeq01ymb9S; Wed, 03 May 2017 16:46:35 -0600 X-Authority-Analysis: v=2.2 cv=QdwWhoTv c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=tJ8p9aeEuA8A:10 a=zstS-IiYAAAA:8 a=nMy4dBnBB8iiG74FPr4A:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 75-166-63-71.hlrn.qwest.net ([75.166.63.71]:53090 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1d632W-00051x-3a; Wed, 03 May 2017 16:46:32 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 07/23] Remove make_cleanup_fclose Date: Wed, 3 May 2017 16:46:10 -0600 Message-Id: <20170503224626.2818-8-tom@tromey.com> In-Reply-To: <20170503224626.2818-1-tom@tromey.com> References: <20170503224626.2818-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1d632W-00051x-3a X-Source-Sender: 75-166-63-71.hlrn.qwest.net (bapiya.Home) [75.166.63.71]:53090 X-Source-Auth: tom+tromey.com X-Email-Count: 14 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== After the preceding patches, make_cleanup_fclose is no longer used, so remove it. 2017-05-02 Tom Tromey * utils.h (make_cleanup_fclose): Remove. * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove. --- gdb/ChangeLog | 5 +++++ gdb/utils.c | 18 ------------------ gdb/utils.h | 2 -- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1dad15be..2f1219f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2017-05-02 Tom Tromey + * utils.h (make_cleanup_fclose): Remove. + * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove. + +2017-05-02 Tom Tromey + * top.c (open_terminal_stream): Return gdb_file_up. (new_ui_command): Update. diff --git a/gdb/utils.c b/gdb/utils.c index b4332f8..bffce78 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -151,24 +151,6 @@ make_cleanup_freeargv (char **arg) return make_cleanup (do_freeargv, arg); } -/* Helper function which does the work for make_cleanup_fclose. */ - -static void -do_fclose_cleanup (void *arg) -{ - FILE *file = (FILE *) arg; - - fclose (file); -} - -/* Return a new cleanup that closes FILE. */ - -struct cleanup * -make_cleanup_fclose (FILE *file) -{ - return make_cleanup (do_fclose_cleanup, file); -} - /* Helper function which does the work for make_cleanup_obstack_free. */ static void diff --git a/gdb/utils.h b/gdb/utils.h index f3e8007..7afb3c5 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -76,8 +76,6 @@ extern struct cleanup *(make_cleanup_free_section_addr_info /* For make_cleanup_close see common/filestuff.h. */ -extern struct cleanup *make_cleanup_fclose (FILE *file); - struct obstack; extern struct cleanup *make_cleanup_obstack_free (struct obstack *obstack);