]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Rename STATS_UNSUPPORTED to STATS_UNSUPPORTED_OPTION
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 26 Oct 2016 21:04:51 +0000 (23:04 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 26 Oct 2016 21:06:39 +0000 (23:06 +0200)
ccache.c
ccache.h
stats.c
test/test_argument_processing.c

index c4070adee98be20ad036a7d988dc3eecb6880774..1ad4df95fca122a5e8ae5cc25eb408ef60c50a1e 100644 (file)
--- 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, ',')) {
index 7b29bb8cd65db0193d420bfbd609e156b03198aa..a79d144197f1a771c247c55b3142e6f3a36df596 100644 (file)
--- 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 d50182d40ac8d07ccd21f5db9b96bab4b16667d0..ff352bc6d0c2c9093b579e6913cc6f65196bc797 100644 (file)
--- a/stats.c
+++ b/stats.c
@@ -165,7 +165,7 @@ static struct {
                0
        },
        {
-               STATS_UNSUPPORTED,
+               STATS_UNSUPPORTED_OPTION,
                "unsupported compiler option",
                NULL,
                0
index f63c3af0aa12e60ccc5c0033f6f985d81868259e..80f23db5c0520cd5b8fe5288365261697515aac3 100644 (file)
@@ -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);
 }