]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove make_cleanup_fclose
authorTom Tromey <tom@tromey.com>
Thu, 27 Apr 2017 04:03:42 +0000 (22:03 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 3 Aug 2017 13:58:56 +0000 (07:58 -0600)
After the preceding patches, make_cleanup_fclose is no longer used, so
remove it.

ChangeLog
2017-08-03  Tom Tromey  <tom@tromey.com>

* utils.h (make_cleanup_fclose): Remove.
* utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.

gdb/ChangeLog
gdb/utils.c
gdb/utils.h

index 9c2e6bafbb12c741aeada14ca0c63b4dd6c21b63..d26d9849bbc0a763ecec9f32b6613a5f913bdbe6 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-03  Tom Tromey  <tom@tromey.com>
+
+       * utils.h (make_cleanup_fclose): Remove.
+       * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
+
 2017-08-03  Tom Tromey  <tom@tromey.com>
 
        * top.c (open_terminal_stream): Return gdb_file_up.
index 43e1827c445be0553ad53672fa2c5231314ea09b..c6b54238fe28fe640488816edfd5493a61c5f060 100644 (file)
@@ -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
index 48330a16f7fb3456950328573d3a433cc72088d9..a6709c07bb6ffe631c4abd3a74ccf459c772c461 100644 (file)
@@ -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);