]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Mark some return values as ignored
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 20 Oct 2024 16:27:10 +0000 (18:27 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Oct 2024 16:42:55 +0000 (18:42 +0200)
src/ccache/core/atomicfile.cpp
src/ccache/core/mainoptions.cpp
src/ccache/progressbar.cpp
src/ccache/signalhandler.cpp

index 65e2918f8cd5f2c101b535d8c7e36d33806debb1..ab48ceabda359adf063dcb6f865286143f80f076 100644 (file)
@@ -42,7 +42,7 @@ AtomicFile::~AtomicFile()
 {
   if (m_stream) {
     // commit() was not called so remove the lingering temporary file.
-    fclose(m_stream);
+    std::ignore = fclose(m_stream); // Not much to do if fclose fails here
     util::remove(m_tmp_path);
   }
 }
index 163ce7292d7f8ff68c4ba2ec8e1ab4d975df9add..0e8875374faa09c64df8067402e725460b4f01f7 100644 (file)
@@ -226,7 +226,7 @@ inspect_path(const fs::path& path)
   }
 
   core::CacheEntry cache_entry(*cache_entry_data);
-  fputs(cache_entry.header().inspect().c_str(), stdout);
+  std::ignore = fputs(cache_entry.header().inspect().c_str(), stdout);
 
   const auto payload = cache_entry.payload();
 
index 8e65f21e9880fb79f8d66c2af5694a8f6df05cd2..8627aabb185cfaadbf9cb32f567299f700c7de91 100644 (file)
@@ -103,5 +103,5 @@ ProgressBar::update(double value)
           unfilled_bar_width);
   }
 
-  fflush(stdout);
+  std::ignore = fflush(stdout);
 }
index acb405796515918b10a2dccb7e46bcdc0fb67c2f..f10c459aea23e3c43ae2960cb56380764cc4ece3 100644 (file)
@@ -100,7 +100,7 @@ SignalHandler::on_signal(int signum)
 
   // Unregister handler for this signal so that we can send the signal to
   // ourselves at the end of the handler.
-  signal(signum, SIG_DFL);
+  std::ignore = signal(signum, SIG_DFL);
 
   // If ccache was killed explicitly, then bring the compiler subprocess (if
   // any) with us as well.