From: Joel Rosdahl Date: Tue, 22 Oct 2019 18:29:19 +0000 (+0200) Subject: Please Clang’s -Wmissing-variable-declarations X-Git-Tag: v4.0~725 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f020b96552ba7fdcb68beac09b592a35041da748;p=thirdparty%2Fccache.git Please Clang’s -Wmissing-variable-declarations (cherry picked from commit 736237aeb21eceaf7a80f13d59ad47c35d76b8bb) --- diff --git a/src/ccache.cpp b/src/ccache.cpp index a0dc5a9f7..3a875f056 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -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);