From patchwork Wed Aug 2 15:02:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 21853 Received: (qmail 26518 invoked by alias); 2 Aug 2017 15:02:55 -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 26428 invoked by uid 89); 2 Aug 2017 15:02:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy2-pub.mail.unifiedlayer.com Received: from gproxy2-pub.mail.unifiedlayer.com (HELO gproxy2-pub.mail.unifiedlayer.com) (69.89.18.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Aug 2017 15:02:52 +0000 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy2.mail.unifiedlayer.com (Postfix) with ESMTP id E857C1E0F58 for ; Wed, 2 Aug 2017 09:02:36 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id sF2Z1v0222f2jeq01F2cPZ; Wed, 02 Aug 2017 09:02:36 -0600 X-Authority-Analysis: v=2.2 cv=aJeAkf1m c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=KeKAF7QvOSUA:10 a=zstS-IiYAAAA:8 a=nMy4dBnBB8iiG74FPr4A:9 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 174-29-39-24.hlrn.qwest.net ([174.29.39.24]:54692 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dcvAP-002dpC-Dj; Wed, 02 Aug 2017 09:02:33 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA v3 07/23] Remove make_cleanup_fclose Date: Wed, 2 Aug 2017 09:02:11 -0600 Message-Id: <20170802150227.24460-8-tom@tromey.com> In-Reply-To: <20170802150227.24460-1-tom@tromey.com> References: <20170802150227.24460-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dcvAP-002dpC-Dj X-Source-Sender: 174-29-39-24.hlrn.qwest.net (bapiya.Home) [174.29.39.24]:54692 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes After the preceding patches, make_cleanup_fclose is no longer used, so remove it. ChangeLog 2017-08-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 c1a4e7b..3b5286c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2017-08-02 Tom Tromey + * utils.h (make_cleanup_fclose): Remove. + * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove. + +2017-08-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 43e1827..c6b5423 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -148,24 +148,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 for make_cleanup_ui_out_redirect_pop. */ static void diff --git a/gdb/utils.h b/gdb/utils.h index 48330a1..a6709c0 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -101,8 +101,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); - extern struct cleanup *make_cleanup_restore_integer (int *variable); extern struct cleanup *make_cleanup_restore_uinteger (unsigned int *variable);