Ran the static analyzer on the codebase and found a few things.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 4fac83d..180c1f3 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1824,13 +1824,13 @@
std::string name;
std::string value;
uint16_t port = 0;
- lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
+ //lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
while (response.GetNameColonValue(name, value))
{
if (name.size() == 4 && name.compare("port") == 0)
port = Args::StringToUInt32(value.c_str(), 0, 0);
- if (name.size() == 3 && name.compare("pid") == 0)
- pid = Args::StringToUInt32(value.c_str(), LLDB_INVALID_PROCESS_ID, 0);
+// if (name.size() == 3 && name.compare("pid") == 0)
+// pid = Args::StringToUInt32(value.c_str(), LLDB_INVALID_PROCESS_ID, 0);
}
return port;
}
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 06d19e4..6e8b3c4 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -229,8 +229,7 @@
m_register_info.Clear();
uint32_t reg_offset = 0;
uint32_t reg_num = 0;
- StringExtractorGDBRemote::ResponseType response_type;
- for (response_type = StringExtractorGDBRemote::eResponse;
+ for (StringExtractorGDBRemote::ResponseType response_type = StringExtractorGDBRemote::eResponse;
response_type == StringExtractorGDBRemote::eResponse;
++reg_num)
{
@@ -376,7 +375,6 @@
}
else
{
- response_type = StringExtractorGDBRemote::eError;
break;
}
}
@@ -1271,7 +1269,6 @@
uint32_t exc_type = 0;
std::vector<addr_t> exc_data;
addr_t thread_dispatch_qaddr = LLDB_INVALID_ADDRESS;
- uint32_t exc_data_count = 0;
ThreadSP thread_sp;
while (stop_packet.GetNameColonValue(name, value))
@@ -1281,11 +1278,6 @@
// exception type in big endian hex
exc_type = Args::StringToUInt32 (value.c_str(), 0, 16);
}
- else if (name.compare("mecount") == 0)
- {
- // exception count in big endian hex
- exc_data_count = Args::StringToUInt32 (value.c_str(), 0, 16);
- }
else if (name.compare("medata") == 0)
{
// exception data in big endian hex