]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Please Clang’s -Wmissing-variable-declarations
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Oct 2019 18:29:19 +0000 (20:29 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Oct 2019 19:14:21 +0000 (21:14 +0200)
(cherry picked from commit 736237aeb21eceaf7a80f13d59ad47c35d76b8bb)

src/ccache.cpp

index a0dc5a9f74a02c8a6b61eae4f134dcdfce177bc9..3a875f0566ea890dac42175c17e8e01708f98737 100644 (file)
@@ -277,7 +277,7 @@ static struct pending_tmp_file* pending_tmp_files = NULL;
 
 // How often (in seconds) to scan $CCACHE_DIR/tmp for left-over temporary
 // files.
-const int k_internal_tempdir_cleanup_interval = 2 * 24 * 60 * 60; // 2 days
+static const int k_tempdir_cleanup_interval = 2 * 24 * 60 * 60; // 2 days
 
 #ifndef _WIN32
 static sigset_t fatal_signal_set;
@@ -476,7 +476,7 @@ clean_up_internal_tempdir(void)
 {
   time_t now = time(NULL);
   auto st = Stat::stat(g_config.cache_dir(), Stat::OnError::log);
-  if (!st || st.mtime() + k_internal_tempdir_cleanup_interval >= now) {
+  if (!st || st.mtime() + k_tempdir_cleanup_interval >= now) {
     // No cleanup needed.
     return;
   }
@@ -496,7 +496,7 @@ clean_up_internal_tempdir(void)
 
     char* path = format("%s/%s", temp_dir(), entry->d_name);
     st = Stat::lstat(path, Stat::OnError::log);
-    if (st && st.mtime() + k_internal_tempdir_cleanup_interval < now) {
+    if (st && st.mtime() + k_tempdir_cleanup_interval < now) {
       tmp_unlink(path);
     }
     free(path);