summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-07-17 03:23:13 +0000
committerGreg Clayton <gclayton@apple.com>2012-07-17 03:23:13 +0000
commit23f59509a8790b04c691ec063c55724a3bfee7eb (patch)
tree9bd1537b53423b7a43ccd4b9bceb178960bbbb02 /lldb/source/Commands
parent24a8378c4f5ab46f9156e8c271500a6e051c2fd4 (diff)
downloadbcm5719-llvm-23f59509a8790b04c691ec063c55724a3bfee7eb.tar.gz
bcm5719-llvm-23f59509a8790b04c691ec063c55724a3bfee7eb.zip
Ran the static analyzer on the codebase and found a few things.
llvm-svn: 160338
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp24
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp7
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp16
3 files changed, 18 insertions, 29 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 2e764cadd84..6228333cdd6 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -373,14 +373,8 @@ protected:
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 @@ CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint (CommandInter
"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 @@ CommandObjectMultiwordBreakpoint::CommandObjectMultiwordBreakpoint (CommandInter
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/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 2df3ac3a9d3..e8425599cc1 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -864,7 +864,6 @@ CommandObjectBreakpointCommand::CommandObjectBreakpointCommand (CommandInterpret
"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 @@ CommandObjectBreakpointCommand::CommandObjectBreakpointCommand (CommandInterpret
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/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 973b9d4a385..000c5907670 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -1295,8 +1295,6 @@ CommandObjectMultiwordWatchpoint::CommandObjectMultiwordWatchpoint(CommandInterp
"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 @@ CommandObjectMultiwordWatchpoint::CommandObjectMultiwordWatchpoint(CommandInterp
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()
OpenPOWER on IntegriCloud