summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-10-15 23:13:51 +0000
committerJason Molenda <jmolenda@apple.com>2014-10-15 23:13:51 +0000
commitaeb9a06ff50fde033d442e7757cab1bb36e3b684 (patch)
tree6d8857019161b9e4fbf915163f23df519107269f
parent42e929f7733955ca4144e8c3ba7cab5f8156e145 (diff)
downloadbcm5719-llvm-aeb9a06ff50fde033d442e7757cab1bb36e3b684.tar.gz
bcm5719-llvm-aeb9a06ff50fde033d442e7757cab1bb36e3b684.zip
Fix unused-variable warnings from the clang static analyzer.
llvm-svn: 219863
-rw-r--r--lldb/tools/debugserver/source/DNB.cpp4
-rw-r--r--lldb/tools/debugserver/source/MacOSX/Genealogy.cpp2
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachTask.mm4
-rw-r--r--lldb/tools/debugserver/source/RNBRemote.cpp4
-rw-r--r--lldb/tools/debugserver/source/RNBServices.cpp2
5 files changed, 5 insertions, 11 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index 304c655921d..c6a3dbe696b 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -192,24 +192,20 @@ kqueue_thread (void *arg)
bool exited = false;
int signal = 0;
int exit_status = 0;
- const char *status_cstr = NULL;
if (WIFSTOPPED(status))
{
signal = WSTOPSIG(status);
- status_cstr = "STOPPED";
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> STOPPED (signal = %i)", child_pid, signal);
}
else if (WIFEXITED(status))
{
exit_status = WEXITSTATUS(status);
- status_cstr = "EXITED";
exited = true;
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> EXITED (status = %i)", child_pid, exit_status);
}
else if (WIFSIGNALED(status))
{
signal = WTERMSIG(status);
- status_cstr = "SIGNALED";
if (child_pid == abs(pid))
{
DNBLogThreadedIf(LOG_PROCESS, "waitpid (%i) -> SIGNALED and EXITED (signal = %i)", child_pid, signal);
diff --git a/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp b/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp
index 1544dc26b60..e6ada966b81 100644
--- a/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/Genealogy.cpp
@@ -236,12 +236,10 @@ Genealogy::GetActivities(pid_t pid, const MachThreadList &thread_list, task_t ta
nub_thread_t thread_id = iter->first;
uint64_t activity_id = iter->second;
ActivityList::const_iterator activity_search;
- bool found_activity_for_this_thread = false;
for (activity_search = activities.begin(); activity_search != activities.end(); ++activity_search)
{
if (activity_search->activity_id == activity_id)
{
- found_activity_for_this_thread = true;
ThreadActivitySP thread_activity_sp (new ThreadActivity());
thread_activity_sp->current_activity = *activity_search;
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.mm b/lldb/tools/debugserver/source/MacOSX/MachTask.mm
index c14b377f118..2cb456cff7c 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachTask.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachTask.mm
@@ -309,9 +309,9 @@ static void get_threads_profile_data(DNBProfileDataScanType scanType, task_t tas
threads_used_usec.push_back(used_usec);
}
- kr = mach_port_deallocate(mach_task_self(), threads[i]);
+ mach_port_deallocate(mach_task_self(), threads[i]);
}
- kr = mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)(uintptr_t)threads, tcnt * sizeof(*threads));
+ mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)(uintptr_t)threads, tcnt * sizeof(*threads));
}
#define RAW_HEXBASE std::setfill('0') << std::hex << std::right
diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp
index aa5bcd130f6..8f419e7d6e0 100644
--- a/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -4455,9 +4455,9 @@ RNBRemote::HandlePacket_qProcessInfo (const char *p)
++offset;
}
// Now skip all arguments
- for (int i=0; i<static_cast<int>(argc); ++i)
+ for (uint32_t i = 0; i < argc; ++i)
{
- cstr = data.GetCStr(&offset);
+ data.GetCStr(&offset);
}
// Now iterate across all environment variables
diff --git a/lldb/tools/debugserver/source/RNBServices.cpp b/lldb/tools/debugserver/source/RNBServices.cpp
index 9d76209feb7..aaf2d4f1590 100644
--- a/lldb/tools/debugserver/source/RNBServices.cpp
+++ b/lldb/tools/debugserver/source/RNBServices.cpp
@@ -194,7 +194,7 @@ ListApplications(std::string& plist, bool opt_runningApps, bool opt_debuggable)
#else // #if defined (WITH_SPRINGBOARD) || defined (WITH_BKS)
// When root, show all processes
bool all_users = (our_uid == 0);
- result = GetProcesses (plistMutableArray.get(), all_users);
+ GetProcesses (plistMutableArray.get(), all_users);
#endif
CFReleaser<CFDataRef> plistData (::CFPropertyListCreateXMLData (alloc, plistMutableArray.get()));
OpenPOWER on IntegriCloud