https://gcc.gnu.org/g:9a402db6ed749dc14429e2598ab586074f1796c6
commit r16-1704-g9a402db6ed749dc14429e2598ab586074f1796c6 Author: Martin Jambor <mjam...@suse.cz> Date: Thu Jun 26 11:34:46 2025 +0200 lto-ltrans-cache: Remove unused private member When building GCC with clang, it warns that the private member suffix in class ltrans_file_cache (defined in lto-ltrans-cache.h) is not used which indeed looks like it is the case. This patch therefore removes it along with its initialization in the constructor. gcc/ChangeLog: 2025-06-24 Martin Jambor <mjam...@suse.cz> * lto-ltrans-cache.h (class ltrans_file_cache): Remove member prefix. * lto-ltrans-cache.cc (ltrans_file_cache::ltrans_file_cache): Do not initialize member prefix. Diff: --- gcc/lto-ltrans-cache.cc | 3 +-- gcc/lto-ltrans-cache.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/lto-ltrans-cache.cc b/gcc/lto-ltrans-cache.cc index c57775fae851..91af6ed6f823 100644 --- a/gcc/lto-ltrans-cache.cc +++ b/gcc/lto-ltrans-cache.cc @@ -210,8 +210,7 @@ write_cache_item (FILE* f, ltrans_file_cache::item *item, const char* dir) ltrans_file_cache::ltrans_file_cache (const char* dir, const char* prefix, const char* suffix, size_t soft_cache_size): - dir (dir), prefix (prefix), suffix (suffix), - soft_cache_size (soft_cache_size) + dir (dir), suffix (suffix), soft_cache_size (soft_cache_size) { if (!dir) return; diff --git a/gcc/lto-ltrans-cache.h b/gcc/lto-ltrans-cache.h index 5fef44bae538..fdb7a3894359 100644 --- a/gcc/lto-ltrans-cache.h +++ b/gcc/lto-ltrans-cache.h @@ -122,8 +122,7 @@ private: std::map<checksum_t, item*> map_checksum; std::map<std::string, item*> map_input; - /* Cached filenames are in format "prefix%d[.ltrans]suffix". */ - const char* prefix; + /* Cached filenames are in format "cache_prefix%d[.ltrans]suffix". */ const char* suffix; /* If cache items count is larger, prune deletes old items. */