Remove RTC_WARN_UNUSED_RESULT in favor of ABSL_MUST_USE_RESULT.

This header landed recently but it was not built, so this wasn't
caught.

Bug: webrtc:12336
Change-Id: Ie566d4fe22d1c9f17488ac1cf94068e606c0378b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216381
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33859}
This commit is contained in:
Mirko Bonadei 2021-04-27 20:33:51 +02:00 committed by WebRTC LUCI CQ
parent f8ada61773
commit 769629e02f

View File

@ -13,6 +13,7 @@
#include <atomic>
#include "absl/base/attributes.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/unused.h"
#include "rtc_base/thread_annotations.h"
@ -41,7 +42,7 @@ class RTC_LOCKABLE MutexImpl final {
RTC_CHECK(was_free)
<< "WEBRTC_RACE_CHECK_MUTEX: mutex locked concurrently.";
}
RTC_WARN_UNUSED_RESULT bool TryLock() RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
ABSL_MUST_USE_RESULT bool TryLock() RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
bool was_free = free_.exchange(false, std::memory_order_acquire);
return was_free;
}