]> 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 18:30:01 +0000 (20:30 +0200)
src/ccache.c

index 5fa817e741e1939ef1ff19269069268f686bcb10..1f1b691b4cb2d5f996fca347043286ff43d1c102 100644 (file)
@@ -282,7 +282,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;
@@ -485,7 +485,7 @@ clean_up_internal_tempdir(void)
        time_t now = time(NULL);
        struct stat st;
        if (x_stat(conf->cache_dir, &st) != 0
-                       || st.st_mtime + k_internal_tempdir_cleanup_interval >= now) {
+                       || st.st_mtime + k_tempdir_cleanup_interval >= now) {
                // No cleanup needed.
                return;
        }
@@ -505,7 +505,7 @@ clean_up_internal_tempdir(void)
 
                char *path = format("%s/%s", temp_dir(), entry->d_name);
                if (x_lstat(path, &st) == 0
-                               && st.st_mtime + k_internal_tempdir_cleanup_interval < now) {
+                               && st.st_mtime + k_tempdir_cleanup_interval < now) {
                        tmp_unlink(path);
                }
                free(path);