Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bin/genhtml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions bin/geninfo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
11 changes: 11 additions & 0 deletions example/methods/iterate.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
#include <limits.h>
#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
Expand All @@ -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");
}
8 changes: 4 additions & 4 deletions tests/gendiffcov/insensitive/annotate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lcov/extract/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down