From 1ef026cdccc19884083f1ea3f4fe841ed645c54d Mon Sep 17 00:00:00 2001 From: Bright Chen Date: Mon, 9 Dec 2024 23:27:47 +0800 Subject: [PATCH] Fix unused private field warning of FastPthreadMutex --- src/bthread/mutex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bthread/mutex.cpp b/src/bthread/mutex.cpp index 451a5c90e1..f80e53e6d2 100644 --- a/src/bthread/mutex.cpp +++ b/src/bthread/mutex.cpp @@ -658,7 +658,7 @@ void submit_contention(const bthread_contention_site_t& csite, int64_t now_ns) { } #if BRPC_DEBUG_LOCK -#define MUTEX_RESET_OWNER_COMMON(owner) \ +#define MUTEX_RESET_OWNER_COMMON(owner) \ ((butil::atomic*)&(owner).hold) \ ->store(false, butil::memory_order_relaxed) @@ -678,9 +678,9 @@ void submit_contention(const bthread_contention_site_t& csite, int64_t now_ns) { << std::endl << trace.ToString(); \ } #else -#define MUTEX_RESET_OWNER_COMMON(owner) ((void)0) -#define PTHREAD_MUTEX_SET_OWNER(owner) ((void)0) -#define PTHREAD_MUTEX_CHECK_OWNER(owner) ((void)0) +#define MUTEX_RESET_OWNER_COMMON(owner) ((void)owner) +#define PTHREAD_MUTEX_SET_OWNER(owner) ((void)owner) +#define PTHREAD_MUTEX_CHECK_OWNER(owner) ((void)owner) #endif // BRPC_DEBUG_LOCK namespace internal {