Skip to content

Commit 38fbe93

Browse files
Peter Oberparleiteroberpar
authored andcommitted
geninfo: don't warn about missing .gcov files
Newer versions of gcc remove .gcov files for source files that do not contribute instrumented lines. Remove the WARNING: no data found for file.c warning that geninfo issues in this case.
1 parent 2934654 commit 38fbe93

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

bin/geninfo

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if( $^O eq "msys" )
6161
}
6262

6363
# Constants
64-
our $lcov_version = 'LCOV version 1.11 pre (CVS $Revision: 1.119 $)';
64+
our $lcov_version = 'LCOV version 1.11 pre (CVS $Revision: 1.120 $)';
6565
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php";
6666
our $gcov_tool = "gcov";
6767
our $tool_name = basename($0);
@@ -864,7 +864,6 @@ sub process_dafile($$)
864864
my $source; # gcov source header information
865865
my $object; # gcov object header information
866866
my @matches; # List of absolute paths matching filename
867-
my @unprocessed; # List of unprocessed source code files
868867
my $base_dir; # Base directory for current file
869868
my @tmp_links; # Temporary links to be cleaned up
870869
my @result;
@@ -1060,7 +1059,6 @@ sub process_dafile($$)
10601059

10611060
# Traverse the list of generated .gcov files and combine them into a
10621061
# single .info file
1063-
@unprocessed = keys(%{$instr});
10641062
foreach $gcov_file (sort(@gcov_list))
10651063
{
10661064
my $i;
@@ -1143,16 +1141,6 @@ sub process_dafile($$)
11431141
\@matches, \@gcov_content);
11441142
}
11451143

1146-
# Remove processed file from list
1147-
for ($index = scalar(@unprocessed) - 1; $index >= 0; $index--)
1148-
{
1149-
if ($unprocessed[$index] eq $source_filename)
1150-
{
1151-
splice(@unprocessed, $index, 1);
1152-
last;
1153-
}
1154-
}
1155-
11561144
# Skip external files if requested
11571145
if (!$opt_external) {
11581146
if (is_external($source_filename)) {
@@ -1297,16 +1285,6 @@ sub process_dafile($$)
12971285
unlink($gcov_file);
12981286
}
12991287

1300-
# Check for files which show up in the graph file but were never
1301-
# processed
1302-
if (@unprocessed && @gcov_list)
1303-
{
1304-
foreach (@unprocessed)
1305-
{
1306-
warn("WARNING: no data found for $_\n");
1307-
}
1308-
}
1309-
13101288
if (!($output_filename && ($output_filename eq "-")))
13111289
{
13121290
close(INFO_HANDLE);

0 commit comments

Comments
 (0)