Remove unneeded variable num_found.
authorJim Ingham <jingham@apple.com>
Tue, 19 Oct 2021 16:56:34 +0000 (09:56 -0700)
committerJim Ingham <jingham@apple.com>
Tue, 19 Oct 2021 16:57:07 +0000 (09:57 -0700)
lldb/source/Interpreter/CommandInterpreter.cpp

index 1c43ea1..d5426ba 100644 (file)
@@ -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 {};
 }