From: Joel Rosdahl Date: Tue, 22 Oct 2019 18:29:19 +0000 (+0200) Subject: Please Clang’s -Wmissing-variable-declarations X-Git-Tag: v3.7.5~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=736237aeb21eceaf7a80f13d59ad47c35d76b8bb;p=thirdparty%2Fccache.git Please Clang’s -Wmissing-variable-declarations --- diff --git a/src/ccache.c b/src/ccache.c index 5fa817e74..1f1b691b4 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -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);