[Lldb-commits] [lldb] a66798c - Remove unneeded variable num_found.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 19 09:57:13 PDT 2021


Author: Jim Ingham
Date: 2021-10-19T09:57:07-07:00
New Revision: a66798cd67fedc35efbb8986deef417631bbc88a

URL: https://github.com/llvm/llvm-project/commit/a66798cd67fedc35efbb8986deef417631bbc88a
DIFF: https://github.com/llvm/llvm-project/commit/a66798cd67fedc35efbb8986deef417631bbc88a.diff

LOG: Remove unneeded variable num_found.

Added: 
    

Modified: 
    lldb/source/Interpreter/CommandInterpreter.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 1c43ea15af01b..d5426ba1b6dbf 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1255,13 +1255,11 @@ CommandObject *CommandInterpreter::GetUserCommandObject(
     return exact_cmd;
 
   // We didn't have an exact command, so now look for partial matches.
-  size_t num_found;
   StringList tmp_list;
   StringList *matches_ptr = matches ? matches : &tmp_list;
-  num_found =
-      AddNamesMatchingPartialString(GetUserCommands(), cmd_str, *matches_ptr);
-  num_found += AddNamesMatchingPartialString(GetUserMultiwordCommands(),
-                                             cmd_str, *matches_ptr);
+  AddNamesMatchingPartialString(GetUserCommands(), cmd_str, *matches_ptr);
+  AddNamesMatchingPartialString(GetUserMultiwordCommands(),
+                                cmd_str, *matches_ptr);
 
   return {};
 }


        


More information about the lldb-commits mailing list