]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : remove unused local variables (#16140)
authorHaiyue Wang <redacted>
Mon, 22 Sep 2025 08:48:42 +0000 (16:48 +0800)
committerGitHub <redacted>
Mon, 22 Sep 2025 08:48:42 +0000 (11:48 +0300)
These two local variables 'arg' and 'arg_prefix' have been overriden by:

  1. for (const auto & arg : opt.args)

  2. for (int i = 1; i < argc; i++) {
        const std::string arg_prefix = "--";

        std::string arg = argv[i];

common/arg.cpp

index 54df2df87276c4ea6fe7471eb61e237ab713c0ef..612336870ea7aee030e73784816222c9041cb1a7 100644 (file)
@@ -1068,8 +1068,6 @@ static std::string get_all_kv_cache_types() {
 //
 
 static bool common_params_parse_ex(int argc, char ** argv, common_params_context & ctx_arg) {
-    std::string arg;
-    const std::string arg_prefix = "--";
     common_params & params = ctx_arg.params;
 
     std::unordered_map<std::string, common_arg *> arg_to_options;