Skip to content

Commit 54a6d97

Browse files
committed
Bugfix: ERROR_COUNT message
Signed-off-by: Henry Cox <[email protected]>
1 parent 41f63c3 commit 54a6d97

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/lcovutil.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,15 +1753,15 @@ sub update_state
17531753
sub warnSuppress($$)
17541754
{
17551755
my ($code, $errName) = @_;
1756-
if ($message_count[$code] == $suppressAfter - 1) {
1756+
if ($message_count[$code] == ($suppressAfter + 1)) {
17571757
my $explain =
17581758
$lcovutil::verbose ||
17591759
$message_count[$ERROR_COUNT] == 0 ?
1760-
"\n\tTo increase or decrease this limit us '--rc max_message_count=value'."
1760+
"\n\tTo increase or decrease this limit use '--rc max_message_count=value'."
17611761
:
17621762
'';
17631763
ignorable_warning($ERROR_COUNT,
1764-
"$suppressAfter count reached for '$errName' messages: no more will be reported.$explain"
1764+
"max_message_count=$suppressAfter reached for '$errName' messages: no more will be reported.$explain"
17651765
);
17661766
}
17671767
}
@@ -1792,7 +1792,7 @@ sub ignorable_error($$;$)
17921792
$errName = $ERROR_NAME{$code}
17931793
if exists($ERROR_NAME{$code});
17941794

1795-
if ($message_count[$code]++ > $suppressAfter &&
1795+
if ($message_count[$code]++ >= $suppressAfter &&
17961796
0 < $suppressAfter) {
17971797
# safe to just continue without checking anything else - as either
17981798
# this message is not fatal and we emitted it some number of times,
@@ -1844,7 +1844,7 @@ sub ignorable_warning($$;$)
18441844
my $errName = "code_$code";
18451845
$errName = $ERROR_NAME{$code}
18461846
if exists($ERROR_NAME{$code});
1847-
if ($message_count[$code]++ > $suppressAfter &&
1847+
if ($message_count[$code]++ >= $suppressAfter &&
18481848
0 < $suppressAfter) {
18491849
# warn that we are suppressing from here on - for the first skipped
18501850
# message of this type

0 commit comments

Comments
 (0)