diff options
author | Zachary Turner <zturner@google.com> | 2015-02-25 18:42:47 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-02-25 18:42:47 +0000 |
commit | 171d943ac53788d5a41e35927d71dca30f878519 (patch) | |
tree | 70e7d7eb438519e1dff9203cc51116e335215dac /lldb/source/Host/common/Terminal.cpp | |
parent | f42e83cf722b71d82830e038143e3266a1b24a60 (diff) | |
download | bcm5719-llvm-171d943ac53788d5a41e35927d71dca30f878519.tar.gz bcm5719-llvm-171d943ac53788d5a41e35927d71dca30f878519.zip |
Fix warnings found with clang-cl.
Earlier this week I was able to get clang-cl on Windows to be
able to self host. This opened the door to being able to
get a whole new slew of warnings for the Windows build.
This patch fixes all of the warnings, many of which were real
bugs.
llvm-svn: 230522
Diffstat (limited to 'lldb/source/Host/common/Terminal.cpp')
-rw-r--r-- | lldb/source/Host/common/Terminal.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp index ca46eb0f744..9f3abb75e91 100644 --- a/lldb/source/Host/common/Terminal.cpp +++ b/lldb/source/Host/common/Terminal.cpp @@ -180,20 +180,18 @@ TerminalState::Save (int fd, bool save_process_group) bool TerminalState::Restore () const { +#ifndef LLDB_DISABLE_POSIX if (IsValid()) { const int fd = m_tty.GetFileDescriptor(); -#ifndef LLDB_DISABLE_POSIX if (TFlagsIsValid()) fcntl (fd, F_SETFL, m_tflags); -#endif #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED if (TTYStateIsValid()) tcsetattr (fd, TCSANOW, m_termios_ap.get()); #endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED -#ifndef LLDB_DISABLE_POSIX if (ProcessGroupIsValid()) { // Save the original signal handler. @@ -204,9 +202,9 @@ TerminalState::Restore () const // Restore the original signal handler. signal (SIGTTOU, saved_sigttou_callback); } -#endif return true; } +#endif return false; } |