diff --git a/bin/genhtml b/bin/genhtml index 2aa17ad9..dd229d8a 100755 --- a/bin/genhtml +++ b/bin/genhtml @@ -5646,6 +5646,9 @@ sub _synthesize if ($lcovutil::func_coverage) { while (my ($fnName, $funcEntry) = each(%{$fileCovInfo->functionMap()})) { + my $tla = $funcEntry->hit()->[1]; + # deleted function doesn't count + next if grep(/^$tla$/, ('DUB', 'DCB')); my $line = $funcEntry->line(); my $end = $funcEntry->end_line(); $last_line = $line if $line > $last_line; diff --git a/bin/geninfo b/bin/geninfo index 4361b7b5..bec7e001 100755 --- a/bin/geninfo +++ b/bin/geninfo @@ -1073,7 +1073,9 @@ sub _process_one_chunk($$$$) # "name" will be .gcno if "$initial" else will be $gcda my $name = defined($gcda_file) ? $gcda_file : $gcno_file; - info(1, "Processing $name%s\n", defined($pid) ? " in child $pid" : "" . "\n"); + info(1, + "Processing $name%s\n", + defined($pid) ? " in child $pid" : "" . "\n"); my $context = MessageContext->new("capturing from $name"); # multiple gcda files may refer to the same source - so generate the @@ -1516,8 +1518,8 @@ sub gen_info(@) $lcovutil::maxParallelism = 1; if ($chunk->[0]) { my $num = scalar(@{$chunk->[1]}); - lcovutil::info("Processing $num file" . - ($num == 1 ? '' : 's') . + lcovutil::info( + "Processing $num file" . ($num == 1 ? '' : 's') . " from chunk 0 serially\n"); } my $now = Time::HiRes::gettimeofday(); diff --git a/example/methods/iterate.c b/example/methods/iterate.c index 03c33405..e98d8a6f 100644 --- a/example/methods/iterate.c +++ b/example/methods/iterate.c @@ -16,11 +16,14 @@ #include #include "iterate.h" +void test_data_logging(int, int); int iterate_get_sum (int min, int max) { int i, total; + test_data_logging(min, max); + total = 0; /* This is where we loop over each number in the range, including @@ -44,3 +47,11 @@ int iterate_get_sum (int min, int max) return total; } + +void +test_data_logging(int min, int max) +{ + (void)min; /* quiet compiler complaints */ + (void)max; + printf("this is some debug data logging code that gets removed in the final product\n"); +} diff --git a/tests/gendiffcov/insensitive/annotate.sh b/tests/gendiffcov/insensitive/annotate.sh index eaaf4a26..65503446 100755 --- a/tests/gendiffcov/insensitive/annotate.sh +++ b/tests/gendiffcov/insensitive/annotate.sh @@ -33,7 +33,7 @@ OUTER: while ($dir && if (opendir(my $d, $dir)) { foreach my $name (readdir($d)) { - if ($name =~ /$f/i) { + if ($name =~ /^$f$/i) { push(@stack, $name); last OUTER; } @@ -46,7 +46,7 @@ while (1 < scalar(@stack)) { my $f = pop(@stack); opendir(my $d, $path) or die("cannot read dir $path"); foreach my $name (readdir($d)) { - if ($name =~ /$f/i) { + if ($name =~ /^$f$/i) { $path = File::Spec->catdir($path, $name); last; } @@ -61,9 +61,9 @@ $f = pop(@stack) my $annotated = File::Spec->catfile($path, $f . ".annotated"); opendir my $d, $path or die("cannot read $path"); foreach my $name (readdir($d)) { - if ($name =~ /$f\.annotated/i) { + if ($name =~ /^$f\.annotated$/i) { $annotated = File::Spec->catfile($path, $name); - } elsif ($name =~ /$f/i) { # case insensitive match + } elsif ($name =~ /^$f$/i) { # case insensitive match $file = File::Spec->catfile($path, $name); } } diff --git a/tests/lcov/extract/extract.sh b/tests/lcov/extract/extract.sh index 810eb441..0f551184 100755 --- a/tests/lcov/extract/extract.sh +++ b/tests/lcov/extract/extract.sh @@ -226,7 +226,7 @@ if [ 0 != $? ] ; then exit 1 fi fi -grep user context.info +grep user: context.info if [ 0 == $? ] ; then echo "Error: did not expect to find context field in info" if [ $KEEP_GOING == 0 ] ; then