From: Joel Rosdahl Date: Thu, 3 Jun 2010 20:07:39 +0000 (+0200) Subject: Rename "not a C/C++ file" counter to "unsupported source language" X-Git-Tag: v3.0~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba0be15954cb27c43f85d16d472eff00d7bed76c;p=thirdparty%2Fccache.git Rename "not a C/C++ file" counter to "unsupported source language" --- diff --git a/ccache.c b/ccache.c index ac5210d5b..9c773c7d2 100644 --- 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); diff --git a/ccache.h b/ccache.h index 2c9933408..b426f7ad8 100644 --- 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 d0953ca01..a860a05d7 100644 --- 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 09f7768be..b4f72daeb 100755 --- 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