Author: Simon Pilgrim
Date: 2022-01-23T15:12:44Z
New Revision: d13847bbe5e632ec8f62abc81f74b9351a56d28c

URL: 
https://github.com/llvm/llvm-project/commit/d13847bbe5e632ec8f62abc81f74b9351a56d28c
DIFF: 
https://github.com/llvm/llvm-project/commit/d13847bbe5e632ec8f62abc81f74b9351a56d28c.diff

LOG: [lldb] TerminalState::Save - fix unused variable warning

Non-POSIX target builds don't use the file descriptor

Added: 
    

Modified: 
    lldb/source/Host/common/Terminal.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/common/Terminal.cpp 
b/lldb/source/Host/common/Terminal.cpp
index 2a1c12e667bcf..831e9dff4eb18 100644
--- a/lldb/source/Host/common/Terminal.cpp
+++ b/lldb/source/Host/common/Terminal.cpp
@@ -417,8 +417,8 @@ bool TerminalState::Save(Terminal term, bool 
save_process_group) {
   Clear();
   m_tty = term;
   if (m_tty.IsATerminal()) {
-    int fd = m_tty.GetFileDescriptor();
 #if LLDB_ENABLE_POSIX
+    int fd = m_tty.GetFileDescriptor();
     m_tflags = ::fcntl(fd, F_GETFL, 0);
 #if LLDB_ENABLE_TERMIOS
     std::unique_ptr<Terminal::Data> new_data{new Terminal::Data()};


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to