Skip to content

Commit 179515a

Browse files
committed
bugfix: dgcov.pl shows wrong line numbers
dgcov.pl was putting gcov execution counters on wrong lines in the report (*.dgcov files were correct), because it was incrementing the new line number for diff lines starting from '-' (lines from the old file, not present in the new)
1 parent 4f5dea4 commit 179515a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mysql-test/dgcov.pl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ sub print_gcov_for_diff {
112112
$acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /;
113113
++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/;
114114
die "$_^^^ dying", unless /^[- +]/;
115-
++$lnum;
116-
--$cnt;
115+
++$lnum, --$cnt unless /^-/;
117116
}
118117
print $acc if $printme;
119118
close PIPE or die "command '$cmd' failed: $!: $?";

0 commit comments

Comments
 (0)