summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/PseudoTerminal.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-25 18:42:47 +0000
committerZachary Turner <zturner@google.com>2015-02-25 18:42:47 +0000
commit171d943ac53788d5a41e35927d71dca30f878519 (patch)
tree70e7d7eb438519e1dff9203cc51116e335215dac /lldb/source/Utility/PseudoTerminal.cpp
parentf42e83cf722b71d82830e038143e3266a1b24a60 (diff)
downloadbcm5719-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/Utility/PseudoTerminal.cpp')
-rw-r--r--lldb/source/Utility/PseudoTerminal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Utility/PseudoTerminal.cpp b/lldb/source/Utility/PseudoTerminal.cpp
index e728d4ab2a9..36d82aeb60e 100644
--- a/lldb/source/Utility/PseudoTerminal.cpp
+++ b/lldb/source/Utility/PseudoTerminal.cpp
@@ -235,14 +235,13 @@ PseudoTerminal::GetSlaveName (char *error_str, size_t error_len) const
lldb::pid_t
PseudoTerminal::Fork (char *error_str, size_t error_len)
{
+ pid_t pid = LLDB_INVALID_PROCESS_ID;
+#if !defined(_MSC_VER)
if (error_str)
error_str[0] = '\0';
- pid_t pid = LLDB_INVALID_PROCESS_ID;
int flags = O_RDWR;
-#if !defined(_MSC_VER)
flags |= O_CLOEXEC;
-#endif
if (OpenFirstAvailableMaster (flags, error_str, error_len))
{
// Successfully opened our master pseudo terminal
@@ -300,6 +299,7 @@ PseudoTerminal::Fork (char *error_str, size_t error_len)
// Do nothing and let the pid get returned!
}
}
+#endif
return pid;
}
OpenPOWER on IntegriCloud