]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove now unused legacy create_tmp_file
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 18:49:38 +0000 (20:49 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 24 Jul 2020 18:49:38 +0000 (20:49 +0200)
src/legacy_util.cpp
src/legacy_util.hpp

index 6ee411852535af580988b5ce07cf8bba84118c15..51434f85ba5da80a2707d20cdc9c6b39984426b4 100644 (file)
@@ -506,18 +506,6 @@ create_tmp_fd(char** fname)
   return fd;
 }
 
-// Create an empty temporary file. *fname will be reallocated and set to the
-// resulting filename. Returns an open FILE*.
-FILE*
-create_tmp_file(char** fname, const char* mode)
-{
-  FILE* file = fdopen(create_tmp_fd(fname), mode);
-  if (!file) {
-    fatal("Failed to create file %s: %s", *fname, strerror(errno));
-  }
-  return file;
-}
-
 // Return current user's home directory, or throw FatalError if it can't be
 // determined.
 const char*
index 5d3f35a6f33a8830b0ec160db2c3c783edf0f71c..016437bd5d81f3681f3ce6c4729df4cd381f57a8 100644 (file)
@@ -44,7 +44,6 @@ bool parse_size_with_suffix(const char* str, uint64_t* size);
 struct tm* localtime_r(const time_t* timep, struct tm* result);
 #endif
 int create_tmp_fd(char** fname);
-FILE* create_tmp_file(char** fname, const char* mode);
 const char* get_home_directory();
 bool same_executable_name(const char* s1, const char* s2);
 bool is_full_path(const char* path);