From: Joel Rosdahl Date: Wed, 26 Oct 2016 21:04:51 +0000 (+0200) Subject: Rename STATS_UNSUPPORTED to STATS_UNSUPPORTED_OPTION X-Git-Tag: v3.3.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee69e824d7783e7671ec75db0217debfa7a840b9;p=thirdparty%2Fccache.git Rename STATS_UNSUPPORTED to STATS_UNSUPPORTED_OPTION --- diff --git a/ccache.c b/ccache.c index c4070adee..1ad4df95f 100644 --- a/ccache.c +++ b/ccache.c @@ -2136,7 +2136,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, if (str_eq(argv[i], "-optf") || str_eq(argv[i], "--options-file")) { if (i > argc) { cc_log("Expected argument after -optf/--options-file"); - stats_update(STATS_UNSUPPORTED); + stats_update(STATS_UNSUPPORTED_OPTION); result = false; goto out; } @@ -2176,7 +2176,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, // These are always too hard. if (compopt_too_hard(argv[i]) || str_startswith(argv[i], "-fdump-")) { cc_log("Compiler option %s is unsupported", argv[i]); - stats_update(STATS_UNSUPPORTED); + stats_update(STATS_UNSUPPORTED_OPTION); result = false; goto out; } @@ -2190,7 +2190,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, // -Xarch_* options are too hard. if (str_startswith(argv[i], "-Xarch_")) { cc_log("Unsupported compiler option :%s", argv[i]); - stats_update(STATS_UNSUPPORTED); + stats_update(STATS_UNSUPPORTED_OPTION); result = false; goto out; } @@ -2200,7 +2200,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, if (arch_args_size == MAX_ARCH_ARGS - 1) { cc_log("Too many -arch compiler options; ccache supports at most %d", MAX_ARCH_ARGS); - stats_update(STATS_UNSUPPORTED); + stats_update(STATS_UNSUPPORTED_OPTION); result = false; goto out; } @@ -2422,7 +2422,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, // file from compiling the preprocessed file will not be equal to the // object file produced when compiling without ccache. cc_log("Too hard option -Wp,-P detected"); - stats_update(STATS_UNSUPPORTED); + stats_update(STATS_UNSUPPORTED_OPTION); failed(); } else if (str_startswith(argv[i], "-Wp,-MD,") && !strchr(argv[i] + 8, ',')) { diff --git a/ccache.h b/ccache.h index 7b29bb8cd..a79d14419 100644 --- a/ccache.h +++ b/ccache.h @@ -42,7 +42,7 @@ enum stats { STATS_NOINPUT = 17, STATS_MULTIPLE = 18, STATS_CONFTEST = 19, - STATS_UNSUPPORTED = 20, + STATS_UNSUPPORTED_OPTION = 20, STATS_OUTSTDOUT = 21, STATS_CACHEHIT_DIR = 22, STATS_NOOUTPUT = 23, diff --git a/stats.c b/stats.c index d50182d40..ff352bc6d 100644 --- a/stats.c +++ b/stats.c @@ -165,7 +165,7 @@ static struct { 0 }, { - STATS_UNSUPPORTED, + STATS_UNSUPPORTED_OPTION, "unsupported compiler option", NULL, 0 diff --git a/test/test_argument_processing.c b/test/test_argument_processing.c index f63c3af0a..80f23db5c 100644 --- a/test/test_argument_processing.c +++ b/test/test_argument_processing.c @@ -81,7 +81,7 @@ TEST(dash_M_should_be_unsupported) create_file("foo.c", ""); CHECK(!cc_process_args(orig, &preprocessed, &compiler)); - CHECK_INT_EQ(1, stats_get_pending(STATS_UNSUPPORTED)); + CHECK_INT_EQ(1, stats_get_pending(STATS_UNSUPPORTED_OPTION)); args_free(orig); }