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/Commands/CommandObjectBreakpoint.cpp b/source/Commands/CommandObjectBreakpoint.cpp
index 2e764ca..6228333 100644
--- a/source/Commands/CommandObjectBreakpoint.cpp
+++ b/source/Commands/CommandObjectBreakpoint.cpp
@@ -373,14 +373,8 @@
Breakpoint *bp = NULL;
FileSpec module_spec;
- bool use_module = false;
- int num_modules = m_options.m_modules.GetSize();
-
const bool internal = false;
- if ((num_modules > 0) && (break_type != eSetTypeAddress))
- use_module = true;
-
switch (break_type)
{
case eSetTypeFileAndLine: // Breakpoint by source position
@@ -1673,8 +1667,6 @@
"A set of commands for operating on breakpoints. Also see _regexp-break.",
"breakpoint <command> [<command-options>]")
{
- bool status;
-
CommandObjectSP list_command_object (new CommandObjectBreakpointList (interpreter));
CommandObjectSP enable_command_object (new CommandObjectBreakpointEnable (interpreter));
CommandObjectSP disable_command_object (new CommandObjectBreakpointDisable (interpreter));
@@ -1693,14 +1685,14 @@
command_command_object->SetCommandName ("breakpoint command");
modify_command_object->SetCommandName ("breakpoint modify");
- status = LoadSubCommand ("list", list_command_object);
- status = LoadSubCommand ("enable", enable_command_object);
- status = LoadSubCommand ("disable", disable_command_object);
- status = LoadSubCommand ("clear", clear_command_object);
- status = LoadSubCommand ("delete", delete_command_object);
- status = LoadSubCommand ("set", set_command_object);
- status = LoadSubCommand ("command", command_command_object);
- status = LoadSubCommand ("modify", modify_command_object);
+ LoadSubCommand ("list", list_command_object);
+ LoadSubCommand ("enable", enable_command_object);
+ LoadSubCommand ("disable", disable_command_object);
+ LoadSubCommand ("clear", clear_command_object);
+ LoadSubCommand ("delete", delete_command_object);
+ LoadSubCommand ("set", set_command_object);
+ LoadSubCommand ("command", command_command_object);
+ LoadSubCommand ("modify", modify_command_object);
}
CommandObjectMultiwordBreakpoint::~CommandObjectMultiwordBreakpoint ()
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index 2df3ac3..e842559 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -864,7 +864,6 @@
"A set of commands for adding, removing and examining bits of code to be executed when the breakpoint is hit (breakpoint 'commmands').",
"command <sub-command> [<sub-command-options>] <breakpoint-id>")
{
- bool status;
CommandObjectSP add_command_object (new CommandObjectBreakpointCommandAdd (interpreter));
CommandObjectSP delete_command_object (new CommandObjectBreakpointCommandDelete (interpreter));
CommandObjectSP list_command_object (new CommandObjectBreakpointCommandList (interpreter));
@@ -873,9 +872,9 @@
delete_command_object->SetCommandName ("breakpoint command delete");
list_command_object->SetCommandName ("breakpoint command list");
- status = LoadSubCommand ("add", add_command_object);
- status = LoadSubCommand ("delete", delete_command_object);
- status = LoadSubCommand ("list", list_command_object);
+ LoadSubCommand ("add", add_command_object);
+ LoadSubCommand ("delete", delete_command_object);
+ LoadSubCommand ("list", list_command_object);
}
CommandObjectBreakpointCommand::~CommandObjectBreakpointCommand ()
diff --git a/source/Commands/CommandObjectWatchpoint.cpp b/source/Commands/CommandObjectWatchpoint.cpp
index 973b9d4..000c590 100644
--- a/source/Commands/CommandObjectWatchpoint.cpp
+++ b/source/Commands/CommandObjectWatchpoint.cpp
@@ -1295,8 +1295,6 @@
"A set of commands for operating on watchpoints.",
"watchpoint <command> [<command-options>]")
{
- bool status;
-
CommandObjectSP list_command_object (new CommandObjectWatchpointList (interpreter));
CommandObjectSP enable_command_object (new CommandObjectWatchpointEnable (interpreter));
CommandObjectSP disable_command_object (new CommandObjectWatchpointDisable (interpreter));
@@ -1313,13 +1311,13 @@
modify_command_object->SetCommandName("watchpoint modify");
set_command_object->SetCommandName("watchpoint set");
- status = LoadSubCommand ("list", list_command_object);
- status = LoadSubCommand ("enable", enable_command_object);
- status = LoadSubCommand ("disable", disable_command_object);
- status = LoadSubCommand ("delete", delete_command_object);
- status = LoadSubCommand ("ignore", ignore_command_object);
- status = LoadSubCommand ("modify", modify_command_object);
- status = LoadSubCommand ("set", set_command_object);
+ LoadSubCommand ("list", list_command_object);
+ LoadSubCommand ("enable", enable_command_object);
+ LoadSubCommand ("disable", disable_command_object);
+ LoadSubCommand ("delete", delete_command_object);
+ LoadSubCommand ("ignore", ignore_command_object);
+ LoadSubCommand ("modify", modify_command_object);
+ LoadSubCommand ("set", set_command_object);
}
CommandObjectMultiwordWatchpoint::~CommandObjectMultiwordWatchpoint()