Commit 1ec4a27e by Chris Kennelly Committed by Copybara-Service

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
parent b59913e4
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment