Author: Jonas Devlieghere
Date: 2021-11-05T21:12:00-07:00
New Revision: ef2efd2553e00bc98c73843da9792d90e4231d30

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

LOG: [lldb] Remove 'result' variable which is set but not used (NFC)

Added: 
    

Modified: 
    lldb/tools/debugserver/source/TTYState.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/tools/debugserver/source/TTYState.cpp 
b/lldb/tools/debugserver/source/TTYState.cpp
index 96699a360499e..9fe83a3b72e53 100644
--- a/lldb/tools/debugserver/source/TTYState.cpp
+++ b/lldb/tools/debugserver/source/TTYState.cpp
@@ -39,20 +39,19 @@ bool TTYState::GetTTYState(int fd, bool saveProcessGroup) {
 }
 
 bool TTYState::SetTTYState() const {
-  int result = 0;
   if (IsValid()) {
     if (TFlagsValid())
-      result = fcntl(m_fd, F_SETFL, m_tflags);
+      fcntl(m_fd, F_SETFL, m_tflags);
 
     if (TTYStateValid())
-      result = tcsetattr(m_fd, TCSANOW, &m_ttystate);
+      tcsetattr(m_fd, TCSANOW, &m_ttystate);
 
     if (ProcessGroupValid()) {
       // Save the original signal handler.
       void (*saved_sigttou_callback)(int) = NULL;
       saved_sigttou_callback = (void (*)(int))signal(SIGTTOU, SIG_IGN);
       // Set the process group
-      result = tcsetpgrp(m_fd, m_processGroup);
+      tcsetpgrp(m_fd, m_processGroup);
       // Restore the original signal handler.
       signal(SIGTTOU, saved_sigttou_callback);
     }


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

Reply via email to