0

Use std::ignore rather than ignore_result in rlz/

Bug: 1285085
Change-Id: Ibd9236e4f938a856fd9fb55dafeb08710422659f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3374333
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#957005}
This commit is contained in:
Avi Drissman
2022-01-10 11:01:16 +00:00
committed by Chromium LUCI CQ
parent ed74b985b4
commit 9d034b78b7
3 changed files with 9 additions and 6 deletions

@ -4,6 +4,8 @@
#include "rlz/chromeos/lib/rlz_value_store_chromeos.h"
#include <tuple>
#include "base/base_paths.h"
#include "base/bind.h"
#include "base/containers/contains.h"
@ -11,7 +13,6 @@
#include "base/cxx17_backports.h"
#include "base/files/file_util.h"
#include "base/files/important_file_writer.h"
#include "base/ignore_result.h"
#include "base/json/json_file_value_serializer.h"
#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
@ -556,7 +557,7 @@ ScopedRlzValueStoreLock::~ScopedRlzValueStoreLock() {
if (g_lock_depth > 0) {
// Other locks are still using store_, so don't free it yet.
ignore_result(store_.release());
std::ignore = store_.release();
return;
}

@ -11,8 +11,9 @@
#include <sys/types.h>
#include <unistd.h>
#include <tuple>
#include "base/files/file_path.h"
#include "base/ignore_result.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
@ -72,7 +73,7 @@ bool RecursiveCrossProcessLock::TryGetCrossProcessLock(
void RecursiveCrossProcessLock::ReleaseLock() {
if (file_lock_ != -1) {
ignore_result(HANDLE_EINTR(flock(file_lock_, LOCK_UN)));
std::ignore = HANDLE_EINTR(flock(file_lock_, LOCK_UN));
close(file_lock_);
file_lock_ = -1;
}

@ -4,9 +4,10 @@
#include "rlz/mac/lib/rlz_value_store_mac.h"
#include <tuple>
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/ignore_result.h"
#include "base/mac/foundation_util.h"
#include "base/notreached.h"
#include "base/strings/sys_string_conversions.h"
@ -320,7 +321,7 @@ ScopedRlzValueStoreLock::~ScopedRlzValueStoreLock() {
if (g_lock_depth > 0) {
// Other locks are still using store_, don't free it yet.
ignore_result(store_.release());
std::ignore = store_.release();
return;
}