I enabled some extra warnings for hidden local variables and for hidden
virtual functions and caught some things and did some general code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108299 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index 123a5ad..a1b973b 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -258,12 +258,15 @@
                     {
                         if (m_options.m_use_script_language)
                         {
-                            interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (bp_loc_sp->GetLocationOptions(),
-                                                                                                          result);
+                            interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
+                                                                                                         bp_loc_sp->GetLocationOptions(),
+                                                                                                         result);
                         }
                         else
                         {
-                            CollectDataForBreakpointCommandCallback (interpreter, bp_loc_sp->GetLocationOptions(), result);
+                            CollectDataForBreakpointCommandCallback (interpreter, 
+                                                                     bp_loc_sp->GetLocationOptions(), 
+                                                                     result);
                         }
                     }
                 }
@@ -271,12 +274,15 @@
                 {
                     if (m_options.m_use_script_language)
                     {
-                        interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (bp->GetOptions(),
-                                                                                                      result);
+                        interpreter.GetScriptInterpreter()->CollectDataForBreakpointCommandCallback (interpreter,
+                                                                                                     bp->GetOptions(),
+                                                                                                     result);
                     }
                     else
                     {
-                        CollectDataForBreakpointCommandCallback (interpreter, bp->GetOptions(), result);
+                        CollectDataForBreakpointCommandCallback (interpreter, 
+                                                                 bp->GetOptions(), 
+                                                                 result);
                     }
                 }
             }
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index 0b61816..b6b0d24 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -1395,9 +1395,9 @@
                     
                     if (num_matching_modules > 0)
                     {
-                        for (size_t i=0; i<num_matching_modules; ++i)
+                        for (size_t j=0; j<num_matching_modules; ++j)
                         {
-                            Module * image_module = matching_modules.GetModulePointerAtIndex(i);
+                            Module * image_module = matching_modules.GetModulePointerAtIndex(j);
                             if (image_module)
                             {
                                 if (LookupInModule (interpreter, image_module, result, syntax_error))
diff --git a/source/Commands/CommandObjectProcess.cpp b/source/Commands/CommandObjectProcess.cpp
index 6946751..20b008f 100644
--- a/source/Commands/CommandObjectProcess.cpp
+++ b/source/Commands/CommandObjectProcess.cpp
@@ -536,7 +536,7 @@
                 result.AppendMessageWithFormat ("Resuming process %i\n", process->GetID());
                 if (synchronous_execution)
                 {
-                    StateType state = process->WaitForProcessToStop (NULL);
+                    state = process->WaitForProcessToStop (NULL);
 
                     result.SetDidChangeProcessState (true);
                     result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
diff --git a/source/Commands/CommandObjectThread.cpp b/source/Commands/CommandObjectThread.cpp
index 0934045..6c38758 100644
--- a/source/Commands/CommandObjectThread.cpp
+++ b/source/Commands/CommandObjectThread.cpp
@@ -760,7 +760,7 @@
                 result.AppendMessageWithFormat ("Resuming process %i\n", process->GetID());
                 if (synchronous_execution)
                 {
-                    StateType state = process->WaitForProcessToStop (NULL);
+                    state = process->WaitForProcessToStop (NULL);
 
                     result.SetDidChangeProcessState (true);
                     result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
@@ -827,7 +827,7 @@
             {
                 case 't':
                 {
-                    uint32_t m_thread_idx = Args::StringToUInt32 (option_arg, LLDB_INVALID_INDEX32);
+                    m_thread_idx = Args::StringToUInt32 (option_arg, LLDB_INVALID_INDEX32);
                     if (m_thread_idx == LLDB_INVALID_INDEX32)
                     {
                         error.SetErrorStringWithFormat ("Invalid thread index '%s'.\n", option_arg);