diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-10-05 02:52:22 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-10-05 02:52:22 +0000 |
commit | 27148b3d37036ffb7b76521e670254cc96fb898d (patch) | |
tree | 77cc95f7225e77989243f1b13787f9c194ffc134 /lldb/tools/debugserver/source | |
parent | ece63dbd0de745609ea7bd3effe2eb590052336b (diff) | |
download | bcm5719-llvm-27148b3d37036ffb7b76521e670254cc96fb898d.tar.gz bcm5719-llvm-27148b3d37036ffb7b76521e670254cc96fb898d.zip |
Fix a few errors found when building lldb with newer versions of clang.
<rdar://problem/15148224>
llvm-svn: 192024
Diffstat (limited to 'lldb/tools/debugserver/source')
-rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 7 | ||||
-rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index d7955541f14..dd54c6a7b09 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -165,9 +165,10 @@ waitpid_thread (void *arg) static bool spawn_waitpid_thread (pid_t pid) { - pthread_t thread = THREAD_NULL; - ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid); - if (thread != THREAD_NULL) + pthread_t thread; + int ret = ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid); + // pthread_create returns 0 if successful + if (ret == 0) { ::pthread_detach (thread); return true; diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 75ad9f395e5..6adf3de914b 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -815,7 +815,7 @@ best_guess_cpu_type () (end of string). */ std::vector<uint8_t> -decode_binary_data (const char *str, int len) +decode_binary_data (const char *str, size_t len) { std::vector<uint8_t> bytes; if (len == 0) @@ -1253,7 +1253,7 @@ RNBRemote::HandlePacket_A (const char *p) return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "Null packet for 'A' pkt"); } p++; - if (p == '\0' || !isdigit (*p)) + if (*p == '\0' || !isdigit (*p)) { return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "arglen not specified on 'A' pkt"); } |