[Lldb-commits] [lldb] ae5aebd - [lldb][NFC] Add maybe_unused to err used in asserts (#98055)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 9 02:35:59 PDT 2024
Author: Keith Smiley
Date: 2024-07-09T10:35:56+01:00
New Revision: ae5aebd48df8d15f06a7a9aa7a9e193d32cd5c85
URL: https://github.com/llvm/llvm-project/commit/ae5aebd48df8d15f06a7a9aa7a9e193d32cd5c85
DIFF: https://github.com/llvm/llvm-project/commit/ae5aebd48df8d15f06a7a9aa7a9e193d32cd5c85.diff
LOG: [lldb][NFC] Add maybe_unused to err used in asserts (#98055)
Added:
Modified:
lldb/tools/debugserver/source/PThreadMutex.h
Removed:
################################################################################
diff --git a/lldb/tools/debugserver/source/PThreadMutex.h b/lldb/tools/debugserver/source/PThreadMutex.h
index a4535dd79172c..17f9fdff5f2d3 100644
--- a/lldb/tools/debugserver/source/PThreadMutex.h
+++ b/lldb/tools/debugserver/source/PThreadMutex.h
@@ -78,13 +78,13 @@ class PThreadMutex {
};
PThreadMutex() {
- int err;
+ [[maybe_unused]] int err;
err = ::pthread_mutex_init(&m_mutex, NULL);
assert(err == 0);
}
PThreadMutex(int type) {
- int err;
+ [[maybe_unused]] int err;
::pthread_mutexattr_t attr;
err = ::pthread_mutexattr_init(&attr);
assert(err == 0);
@@ -97,7 +97,7 @@ class PThreadMutex {
}
~PThreadMutex() {
- int err;
+ [[maybe_unused]] int err;
err = ::pthread_mutex_destroy(&m_mutex);
if (err != 0) {
err = Unlock();
More information about the lldb-commits
mailing list