From: Martin Jambor Date: Thu, 26 Jun 2025 09:34:46 +0000 (+0200) Subject: lto-ltrans-cache: Remove unused private member X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a402db6ed749dc14429e2598ab586074f1796c6;p=thirdparty%2Fgcc.git 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 * 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 --git a/gcc/lto-ltrans-cache.cc b/gcc/lto-ltrans-cache.cc index c57775fae85..91af6ed6f82 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 5fef44bae53..fdb7a389435 100644 --- a/gcc/lto-ltrans-cache.h +++ b/gcc/lto-ltrans-cache.h @@ -122,8 +122,7 @@ private: std::map map_checksum; std::map 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. */