diff options
author | Chris Kennelly <ckennelly@google.com> | 2024-04-04 11:32:12 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-04 11:33:18 -0700 |
commit | 1ec4a27e39944462a574abbfa040498ed2831cc8 (patch) | |
tree | a9e5d083ececd3f4d39f3a1d65ff37fc1da64e35 /absl | |
parent | b59913e47934a38f9218adf487c9aed7f4242599 (diff) |
Annotate that Mutex should warn when unused.
This often indicates a bug from adding synchronization logic but not using it.
PiperOrigin-RevId: 621921486
Change-Id: Iec49134c5e4bb50d9fc728c1f8a4fd2e86856782
Diffstat (limited to 'absl')
-rw-r--r-- | absl/synchronization/mutex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index d53a22bb..95052252 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -148,7 +148,7 @@ struct SynchWaitParams; // // See also `MutexLock`, below, for scoped `Mutex` acquisition. -class ABSL_LOCKABLE Mutex { +class ABSL_LOCKABLE ABSL_ATTRIBUTE_WARN_UNUSED Mutex { public: // Creates a `Mutex` that is not held by anyone. This constructor is // typically used for Mutexes allocated on the heap or the stack. |