From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48944 invoked by alias); 30 Jul 2017 19:05:32 -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 48928 invoked by uid 89); 30 Jul 2017 19:05:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 30 Jul 2017 19:05:29 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v6UJ5LTE031693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 30 Jul 2017 15:05:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 9A16E1EA08; Sun, 30 Jul 2017 15:05:21 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id CEE2F1E043; Sun, 30 Jul 2017 15:05:10 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 30 Jul 2017 19:05:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA v2 07/24] Remove make_cleanup_fclose In-Reply-To: <20170725172107.9799-8-tom@tromey.com> References: <20170725172107.9799-1-tom@tromey.com> <20170725172107.9799-8-tom@tromey.com> Message-ID: <5c0fd14fc8a57024b3898cc036ba4efd@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sun, 30 Jul 2017 19:05:22 +0000 X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00446.txt.bz2 On 2017-07-25 19:20, Tom Tromey wrote: > After the preceding patches, make_cleanup_fclose is no longer used, so > remove it. > > ChangeLog > 2017-07-25 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 c1730dd..9d46731 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,5 +1,10 @@ > 2017-07-25 Tom Tromey > > + * utils.h (make_cleanup_fclose): Remove. > + * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove. > + > +2017-07-25 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); Yay, thanks! LGTM.