From: Joel Rosdahl Date: Wed, 4 Feb 2015 20:17:36 +0000 (+0100) Subject: Minor style tweaks X-Git-Tag: v3.2.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=548d95a5f95e2c39f898463f71e14295d0a919be;p=thirdparty%2Fccache.git Minor style tweaks --- diff --git a/ccache.c b/ccache.c index 46bee3082..184c300a5 100644 --- a/ccache.c +++ b/ccache.c @@ -158,7 +158,7 @@ static struct hashtable *included_files; /* is gcc being asked to output dependencies? */ static bool generating_dependencies; -/* is gcc being asked to output coverage ? */ +/* is gcc being asked to output coverage? */ static bool generating_coverage; /* is gcc being asked to output coverage data (.gcda) at runtime? */ @@ -1601,11 +1601,9 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) if (produce_dep_file) { get_file_from_cache(cached_dep, output_dep); } - if (generating_coverage) { + if (generating_coverage && stat(cached_cov, &st) == 0 && st.st_size > 0) { /* gcc won't generate notes if there is no code */ - if (stat(cached_cov, &st) == 0 && st.st_size > 0) { - get_file_from_cache(cached_cov, output_cov); - } + get_file_from_cache(cached_cov, output_cov); } if (output_dia) { get_file_from_cache(cached_dia, output_dia); @@ -1979,7 +1977,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args, args_add(stripped_args, argv[i]); continue; } - if (str_eq(argv[i], "--coverage") /* == -fprofile-arcs -ftest-coverage */ ) { + if (str_eq(argv[i], "--coverage")) { /* = -fprofile-arcs -ftest-coverage */ profile_arcs = true; generating_coverage = true; args_add(stripped_args, argv[i]);