From: Joel Rosdahl Date: Tue, 13 Jul 2010 19:06:55 +0000 (+0200) Subject: Refactor process_args to take orig_args as struct ARGS X-Git-Tag: v3.1~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97ea9fd4fa45c4d224adc4879177c5ef0c082dde;p=thirdparty%2Fccache.git Refactor process_args to take orig_args as struct ARGS --- diff --git a/ccache.c b/ccache.c index fabd09a3e..0f24a596e 100644 --- a/ccache.c +++ b/ccache.c @@ -1336,8 +1336,8 @@ static void find_compiler(int argc, char **argv) process the compiler options to form the correct set of options for obtaining the preprocessor output */ -static void process_args(int argc, char **argv, ARGS **preprocessor_args, - ARGS **compiler_args) +static void +process_args(ARGS *orig_args, ARGS **preprocessor_args, ARGS **compiler_args) { int i; int found_c_opt = 0; @@ -1353,12 +1353,14 @@ static void process_args(int argc, char **argv, ARGS **preprocessor_args, /* is the dependency makefile target name specified with -MT or -MQ? */ int dependency_target_specified = 0; ARGS *stripped_args; + int argc = orig_args->argc; + char **argv = orig_args->argv; stripped_args = args_init(0, NULL); args_add(stripped_args, argv[0]); - for (i=1; iargc, orig_args->argv, &preprocessor_args, - &compiler_args); + process_args(orig_args, &preprocessor_args, &compiler_args); cc_log("Source file: %s", input_file); if (generating_dependencies) {