]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Avoid ccache:disable strings in ccache source code
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 17 Aug 2023 16:14:37 +0000 (18:14 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 18 Aug 2023 18:54:38 +0000 (20:54 +0200)
A verbatim ccache:disable string disables ccache when compiling some
ccache sources, which is unnecessary.

src/ccache.cpp
src/core/Statistics.cpp

index b5d30dac7a20a80fc2547788eb52b8fa8fceb711..201d4844b66f911e2c4a272ac009327323eaf5d8 100644 (file)
@@ -99,7 +99,8 @@ const size_t k_ccache_disable_search_limit = 4096;
 
 // String to look for when checking whether to disable ccache for the input
 // file.
-const char k_ccache_disable_token[] = "ccache:disable";
+const char k_ccache_disable_token[] = {
+  'c', 'c', 'a', 'c', 'h', 'e', ':', 'd', 'i', 's', 'a', 'b', 'l', 'e', '\0'};
 
 namespace {
 
index 240fa13377bdadfb270cf1726a7afe64f14fc408..ff6d65fed1fa7c996cd86c147bc61507b87dfd18 100644 (file)
@@ -138,7 +138,7 @@ const StatisticsField k_statistics_fields[] = {
   // A cacheable call resulted in a miss when attempting direct mode lookup.
   FIELD(direct_cache_miss, nullptr),
 
-  // Ccache was disabled by a ccache:disable string in the source code file.
+  // Ccache was disabled by a comment in the source code file.
   FIELD(disabled, "Ccache disabled", FLAG_UNCACHEABLE),
 
   // Failure reading a file specified by extra_files_to_hash/CCACHE_EXTRAFILES.