]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Rename "not a C/C++ file" counter to "unsupported source language"
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Jun 2010 20:07:39 +0000 (22:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Jun 2010 20:07:39 +0000 (22:07 +0200)
ccache.c
ccache.h
stats.c
test.sh

index ac5210d5bd87030197d9239a2f64e30a0229bd8c..9c773c7d2e86fda8d053747a40a221bb8f5e82ae 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1595,8 +1595,8 @@ static void process_args(int argc, char **argv, ARGS **preprocessor_args,
                                        stats_update(STATS_LINK);
                                }
                        } else {
-                               cc_log("Non-C/C++ file: %s", argv[i]);
-                               stats_update(STATS_NOTC);
+                               cc_log("Unsupported source extension: %s", argv[i]);
+                               stats_update(STATS_SOURCELANG);
                        }
                        failed();
                }
@@ -1618,7 +1618,7 @@ static void process_args(int argc, char **argv, ARGS **preprocessor_args,
        if (explicit_language) {
                if (!language_is_supported(explicit_language)) {
                        cc_log("Unsupported language: %s", explicit_language);
-                       stats_update(STATS_UNSUPPORTED);
+                       stats_update(STATS_SOURCELANG);
                        failed();
                }
                actual_language = explicit_language;
@@ -1626,8 +1626,8 @@ static void process_args(int argc, char **argv, ARGS **preprocessor_args,
                actual_language = file_language;
        }
        if (!actual_language) {
-               cc_log("Not a C/C++ file: %s", input_file);
-               stats_update(STATS_NOTC);
+               cc_log("Unsupported source extension: %s", input_file);
+               stats_update(STATS_SOURCELANG);
                failed();
        }
        direct_i_file = language_is_preprocessed(actual_language);
index 2c9933408bf2f1dd10ae4ff24812aa66c65b2ab3..b426f7ad87f3205d6ac5c376e8d909be5d735e62 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -40,7 +40,7 @@ enum stats {
        STATS_TOTALSIZE,
        STATS_MAXFILES,
        STATS_MAXSIZE,
-       STATS_NOTC,
+       STATS_SOURCELANG,
        STATS_DEVICE,
        STATS_NOINPUT,
        STATS_MULTIPLE,
diff --git a/stats.c b/stats.c
index d0953ca01fadae66d72747caeb1706883c7b26ae..a860a05d74f104bfd7ea06a9fc10610ba8f0da76 100644 (file)
--- a/stats.c
+++ b/stats.c
@@ -66,7 +66,7 @@ static struct {
        { STATS_COMPILER,     "couldn't find the compiler     ", NULL, 0 },
        { STATS_MISSING,      "cache file missing             ", NULL, 0 },
        { STATS_ARGS,         "bad compiler arguments         ", NULL, 0 },
-       { STATS_NOTC,         "not a C/C++ file               ", NULL, 0 },
+       { STATS_SOURCELANG,   "unsupported source language    ", NULL, 0 },
        { STATS_CONFTEST,     "autoconf compile/link          ", NULL, 0 },
        { STATS_UNSUPPORTED,  "unsupported compiler option    ", NULL, 0 },
        { STATS_OUTSTDOUT,    "output to stdout               ", NULL, 0 },
diff --git a/test.sh b/test.sh
index 09f7768be29e61f402c7af35c27aebb81c92d6f6..b4f72daebf52be65bd032524dd71c03651e38a6f 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -171,10 +171,10 @@ base_tests() {
     $CCACHE_COMPILE -c test1.c -I 2> /dev/null
     checkstat 'bad compiler arguments' 1
 
-    testname="c/c++"
+    testname="unsupported source language"
     ln -f test1.c test1.ccc
     $CCACHE_COMPILE -c test1.ccc 2> /dev/null
-    checkstat 'not a C/C++ file' 1
+    checkstat 'unsupported source language' 1
 
     testname="unsupported"
     $CCACHE_COMPILE -M foo -c test1.c > /dev/null 2>&1