diff options
author | Oleksiy Vyalov <ovyalov@google.com> | 2015-04-10 03:59:52 +0000 |
---|---|---|
committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-04-10 03:59:52 +0000 |
commit | e17800c5ab21f95a7f3db1f58ec42a8c7338a137 (patch) | |
tree | 433cb4b6d8b38c35eca09b94a3b28341364f81bf | |
parent | 93138503ae86757228f01208831cbfe98a9cfd6e (diff) | |
download | bcm5719-llvm-e17800c5ab21f95a7f3db1f58ec42a8c7338a137.tar.gz bcm5719-llvm-e17800c5ab21f95a7f3db1f58ec42a8c7338a137.zip |
Remove 'z' modifier from printf/sscanf operations in AdbClient - the modifier isn't supported by MS C++ compiler.
llvm-svn: 234562
-rw-r--r-- | lldb/source/Plugins/Platform/Android/AdbClient.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/lldb/source/Plugins/Platform/Android/AdbClient.cpp index f9540650a6e..36f8eadc2d0 100644 --- a/lldb/source/Plugins/Platform/Android/AdbClient.cpp +++ b/lldb/source/Plugins/Platform/Android/AdbClient.cpp @@ -49,7 +49,7 @@ AdbClient::CreateByDeviceID (const char* device_id, AdbClient &adb) else { if (connect_devices.size () != 1) - return Error ("Expected a single connected device, got instead %zu", connect_devices.size ()); + return Error ("Expected a single connected device, got instead %" PRIu64, static_cast<uint64_t>(connect_devices.size ())); adb.SetDeviceID (connect_devices.front ()); } @@ -142,7 +142,7 @@ AdbClient::SendMessage (const std::string &packet) return error; char length_buffer[5]; - snprintf (length_buffer, sizeof (length_buffer), "%04zx", packet.size ()); + snprintf (length_buffer, sizeof (length_buffer), "%04x", static_cast<int>(packet.size ())); ConnectionStatus status; @@ -177,8 +177,8 @@ AdbClient::ReadMessage (std::string &message) if (error.Fail ()) return error; - size_t packet_len = 0; - sscanf (buffer, "%zx", &packet_len); + int packet_len = 0; + sscanf (buffer, "%x", &packet_len); std::string result (packet_len, 0); m_conn.Read (&result[0], packet_len, kConnTimeout, status, &error); if (error.Success ()) @@ -200,7 +200,7 @@ AdbClient::ReadResponseStatus() m_conn.Read (buffer, packet_len, kConnTimeout, status, &error); if (error.Fail ()) - return error; + return error; if (strncmp (buffer, kOKAY, packet_len) != 0) { |