Reland "Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code"
This is a reland of 8c2250eddc7263036397179a0794b9b17d7afb38
Original change's description:
> Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in c++ code
>
> Bug: webrtc:12336
> Change-Id: If76f00d0883b5c8a90d3ef5554f5e22384b3fb58
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197620
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32978}
Bug: webrtc:12336
Change-Id: I1cd017d45c1578528dec4532345950e9823f4a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201732
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33003}
diff --git a/rtc_base/synchronization/mutex_pthread.h b/rtc_base/synchronization/mutex_pthread.h
index c9496e7..8898ca5 100644
--- a/rtc_base/synchronization/mutex_pthread.h
+++ b/rtc_base/synchronization/mutex_pthread.h
@@ -18,6 +18,7 @@
#include <pthread_spis.h>
#endif
+#include "absl/base/attributes.h"
#include "rtc_base/thread_annotations.h"
namespace webrtc {
@@ -39,7 +40,7 @@
~MutexImpl() { pthread_mutex_destroy(&mutex_); }
void Lock() RTC_EXCLUSIVE_LOCK_FUNCTION() { pthread_mutex_lock(&mutex_); }
- RTC_WARN_UNUSED_RESULT bool TryLock() RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
+ ABSL_MUST_USE_RESULT bool TryLock() RTC_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
return pthread_mutex_trylock(&mutex_) == 0;
}
void Unlock() RTC_UNLOCK_FUNCTION() { pthread_mutex_unlock(&mutex_); }