]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix variable shadowing after d0eb89de
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 1 May 2020 15:06:10 +0000 (17:06 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 1 May 2020 15:06:10 +0000 (17:06 +0200)
src/ccache.cpp

index 30f93e0039ef73c1289b273636caaf0b26bfd127..eacbd38212ec6396619ecf47b898a701e65ba49d 100644 (file)
@@ -2515,7 +2515,7 @@ process_args(Context& ctx,
     if (str_startswith(argv[i], "-MF")) {
       dependency_filename_specified = true;
 
-      const char* arg;
+      const char* dep_file;
       bool separate_argument = (strlen(argv[i]) == 3);
       if (separate_argument) {
         // -MF arg
@@ -2523,16 +2523,16 @@ process_args(Context& ctx,
           cc_log("Missing argument to %s", argv[i]);
           return STATS_ARGS;
         }
-        arg = argv[i + 1];
+        dep_file = argv[i + 1];
         i++;
       } else {
         // -MFarg or -MF=arg (EDG-based compilers)
-        arg = &argv[i][3];
-        if (arg[0] == '=') {
-          ++arg;
+        dep_file = &argv[i][3];
+        if (dep_file[0] == '=') {
+          ++dep_file;
         }
       }
-      args_info.output_dep = make_relative_path(ctx, arg);
+      args_info.output_dep = make_relative_path(ctx, dep_file);
       // Keep the format of the args the same.
       if (separate_argument) {
         args_add(dep_args, "-MF");