From 6dd2766a157fa950b7a06b48af1987c697562d7f Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 19 Apr 2019 18:26:29 -0700 Subject: [PATCH] Remove file_access_attempt_t::stale It was unused. --- src/autoload.cpp | 2 -- src/autoload.h | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/autoload.cpp b/src/autoload.cpp index 95827dc2c..02932183f 100644 --- a/src/autoload.cpp +++ b/src/autoload.cpp @@ -26,7 +26,6 @@ static const int kAutoloadStalenessInterval = 15; file_access_attempt_t access_file(const wcstring &path, int mode) { - // std::fwprintf(stderr, L"Touch %ls\n", path.c_str()); file_access_attempt_t result = {}; struct stat statbuf; if (wstat(path, &statbuf)) { @@ -42,7 +41,6 @@ file_access_attempt_t access_file(const wcstring &path, int mode) { // Note that we record the last checked time after the call, on the assumption that in a slow // filesystem, the lag comes before the kernel check, not after. - result.stale = false; result.last_checked = time(NULL); return result; } diff --git a/src/autoload.h b/src/autoload.h index 249b49c34..0ff887404 100644 --- a/src/autoload.h +++ b/src/autoload.h @@ -11,6 +11,7 @@ #include "common.h" #include "env.h" #include "lru.h" +#include "wutil.h" /// Record of an attempt to access a file. struct file_access_attempt_t { @@ -20,8 +21,6 @@ struct file_access_attempt_t { time_t last_checked; /// Whether or not we believe we can access this file bool accessible; - /// The access attempt is stale - bool stale; /// If we cannot access the file, the error code encountered. int error; };