summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-25 19:52:41 +0000
committerZachary Turner <zturner@google.com>2015-02-25 19:52:41 +0000
commit49be160531053ba001f0337951572ea9de064eb9 (patch)
treea4a43bc960f558bc8d58b7fcc972d63db3a4eda1 /lldb/source/Host/common
parent8f12ce082508a700c463f186da67a36cfea7d568 (diff)
downloadbcm5719-llvm-49be160531053ba001f0337951572ea9de064eb9.tar.gz
bcm5719-llvm-49be160531053ba001f0337951572ea9de064eb9.zip
Revert "Fix warnings found with clang-cl."
SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
Diffstat (limited to 'lldb/source/Host/common')
-rw-r--r--lldb/source/Host/common/OptionParser.cpp2
-rw-r--r--lldb/source/Host/common/Socket.cpp6
-rw-r--r--lldb/source/Host/common/Terminal.cpp6
3 files changed, 8 insertions, 6 deletions
diff --git a/lldb/source/Host/common/OptionParser.cpp b/lldb/source/Host/common/OptionParser.cpp
index edd8679d6ac..a91e764bfe3 100644
--- a/lldb/source/Host/common/OptionParser.cpp
+++ b/lldb/source/Host/common/OptionParser.cpp
@@ -54,7 +54,7 @@ OptionParser::Parse (int argc,
return getopt_long_only(argc, argv, optstring, &opts[0], longindex);
}
-const char*
+char*
OptionParser::GetOptionArgument()
{
return optarg;
diff --git a/lldb/source/Host/common/Socket.cpp b/lldb/source/Host/common/Socket.cpp
index 46f36ed5947..b5559fffb45 100644
--- a/lldb/source/Host/common/Socket.cpp
+++ b/lldb/source/Host/common/Socket.cpp
@@ -699,7 +699,7 @@ int Socket::SetOption(int level, int option_name, int option_value)
uint16_t Socket::GetLocalPortNumber(const NativeSocket& socket)
{
// We bound to port zero, so we need to figure out which port we actually bound to
- if (IS_VALID_SOCKET(socket))
+ if (socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
@@ -730,7 +730,7 @@ std::string Socket::GetLocalIPAddress () const
uint16_t Socket::GetRemotePortNumber () const
{
- if (IS_VALID_SOCKET(m_socket))
+ if (m_socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
@@ -743,7 +743,7 @@ uint16_t Socket::GetRemotePortNumber () const
std::string Socket::GetRemoteIPAddress () const
{
// We bound to port zero, so we need to figure out which port we actually bound to
- if (IS_VALID_SOCKET(m_socket))
+ if (m_socket >= 0)
{
SocketAddress sock_addr;
socklen_t sock_addr_len = sock_addr.GetMaxLength ();
diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp
index 9f3abb75e91..ca46eb0f744 100644
--- a/lldb/source/Host/common/Terminal.cpp
+++ b/lldb/source/Host/common/Terminal.cpp
@@ -180,18 +180,20 @@ 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.
@@ -202,9 +204,9 @@ TerminalState::Restore () const
// Restore the original signal handler.
signal (SIGTTOU, saved_sigttou_callback);
}
+#endif
return true;
}
-#endif
return false;
}
OpenPOWER on IntegriCloud