From: Joel Rosdahl Date: Sun, 20 Oct 2024 16:27:10 +0000 (+0200) Subject: chore: Mark some return values as ignored X-Git-Tag: v4.11~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41847f391cf3aeae856f38caf37d804918e29361;p=thirdparty%2Fccache.git chore: Mark some return values as ignored --- diff --git a/src/ccache/core/atomicfile.cpp b/src/ccache/core/atomicfile.cpp index 65e2918f..ab48ceab 100644 --- a/src/ccache/core/atomicfile.cpp +++ b/src/ccache/core/atomicfile.cpp @@ -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); } } diff --git a/src/ccache/core/mainoptions.cpp b/src/ccache/core/mainoptions.cpp index 163ce729..0e887537 100644 --- a/src/ccache/core/mainoptions.cpp +++ b/src/ccache/core/mainoptions.cpp @@ -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(); diff --git a/src/ccache/progressbar.cpp b/src/ccache/progressbar.cpp index 8e65f21e..8627aabb 100644 --- a/src/ccache/progressbar.cpp +++ b/src/ccache/progressbar.cpp @@ -103,5 +103,5 @@ ProgressBar::update(double value) unfilled_bar_width); } - fflush(stdout); + std::ignore = fflush(stdout); } diff --git a/src/ccache/signalhandler.cpp b/src/ccache/signalhandler.cpp index acb40579..f10c459a 100644 --- a/src/ccache/signalhandler.cpp +++ b/src/ccache/signalhandler.cpp @@ -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.