]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lto-ltrans-cache: Remove unused private member
authorMartin Jambor <mjambor@suse.cz>
Thu, 26 Jun 2025 09:34:46 +0000 (11:34 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 26 Jun 2025 09:34:59 +0000 (11:34 +0200)
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  <mjambor@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.

gcc/lto-ltrans-cache.cc
gcc/lto-ltrans-cache.h

index c57775fae851eb38c1a8fade0ccd707200035746..91af6ed6f823d2ef291f6834e635c5c39daba423 100644 (file)
@@ -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;
 
index 5fef44bae5389eb1efb4d357e779fabde81c1d8a..fdb7a3894359aac2d2e3c5e92a25978d38111b33 100644 (file)
@@ -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.  */