[Lldb-commits] [lldb] 4391625 - [lldb] Fix an unused function warning
Kazu Hirata via lldb-commits
lldb-commits at lists.llvm.org
Wed May 25 09:49:15 PDT 2022
Author: Kazu Hirata
Date: 2022-05-25T09:49:05-07:00
New Revision: 4391625255c62074037d95a55232a87eae70c60b
URL: https://github.com/llvm/llvm-project/commit/4391625255c62074037d95a55232a87eae70c60b
DIFF: https://github.com/llvm/llvm-project/commit/4391625255c62074037d95a55232a87eae70c60b.diff
LOG: [lldb] Fix an unused function warning
This patch fixes:
.../llvm-project/lldb/source/Host/common/PseudoTerminal.cpp:106:20:
error: unused function 'use_ptsname' [-Werror,-Wunused-function]
Added:
Modified:
lldb/source/Host/common/PseudoTerminal.cpp
Removed:
################################################################################
diff --git a/lldb/source/Host/common/PseudoTerminal.cpp b/lldb/source/Host/common/PseudoTerminal.cpp
index 13c82e8b1ea91..be4c3c7928dfd 100644
--- a/lldb/source/Host/common/PseudoTerminal.cpp
+++ b/lldb/source/Host/common/PseudoTerminal.cpp
@@ -103,6 +103,7 @@ llvm::Error PseudoTerminal::OpenSecondary(int oflag) {
std::error_code(errno, std::generic_category()));
}
+#if !HAVE_PTSNAME_R || defined(__APPLE__)
static std::string use_ptsname(int fd) {
static std::mutex mutex;
std::lock_guard<std::mutex> guard(mutex);
@@ -110,6 +111,7 @@ static std::string use_ptsname(int fd) {
assert(r != nullptr);
return r;
}
+#endif
std::string PseudoTerminal::GetSecondaryName() const {
assert(m_primary_fd >= 0);
More information about the lldb-commits
mailing list