From: Joel Rosdahl Date: Fri, 1 May 2020 15:06:10 +0000 (+0200) Subject: Fix variable shadowing after d0eb89de X-Git-Tag: v4.0~516 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd9a78fbc6526c24d4cf96cfbe42cdd23ac16ec;p=thirdparty%2Fccache.git Fix variable shadowing after d0eb89de --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 30f93e003..eacbd3821 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -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");