@@ -73,7 +73,7 @@ use Digest::MD5 qw(md5_base64);
73
73
74
74
# Global constants
75
75
our $title = " LCOV - code coverage report" ;
76
- our $lcov_version = ' LCOV version 1.11 pre (CVS $Revision: 1.76 $)' ;
76
+ our $lcov_version = ' LCOV version 1.11 pre (CVS $Revision: 1.77 $)' ;
77
77
our $lcov_url = " http://ltp.sourceforge.net/coverage/lcov.php" ;
78
78
our $tool_name = basename($0 );
79
79
@@ -1835,19 +1835,19 @@ sub set_info_entry($$$$$$$$$;$$$$$$)
1835
1835
1836
1836
sub add_counts ($$)
1837
1837
{
1838
- my %data1 = %{ $_ [0]} ; # Hash 1
1839
- my %data2 = %{ $_ [1]} ; # Hash 2
1838
+ my $data1_ref = $_ [0]; # Hash 1
1839
+ my $data2_ref = $_ [1]; # Hash 2
1840
1840
my %result ; # Resulting hash
1841
1841
my $line ; # Current line iteration scalar
1842
1842
my $data1_count ; # Count of line in hash1
1843
1843
my $data2_count ; # Count of line in hash2
1844
1844
my $found = 0; # Total number of lines found
1845
1845
my $hit = 0; # Number of lines with a count > 0
1846
1846
1847
- foreach $line (keys (%data1 ))
1847
+ foreach $line (keys (%$data1_ref ))
1848
1848
{
1849
- $data1_count = $data1 {$line };
1850
- $data2_count = $data2 {$line };
1849
+ $data1_count = $data1_ref -> {$line };
1850
+ $data2_count = $data2_ref -> {$line };
1851
1851
1852
1852
# Add counts if present in both hashes
1853
1853
if (defined ($data2_count )) { $data1_count += $data2_count ; }
@@ -1859,14 +1859,14 @@ sub add_counts($$)
1859
1859
if ($data1_count > 0) { $hit ++; }
1860
1860
}
1861
1861
1862
- # Add lines unique to data2
1863
- foreach $line (keys (%data2 ))
1862
+ # Add lines unique to data2_ref
1863
+ foreach $line (keys (%$data2_ref ))
1864
1864
{
1865
- # Skip lines already in data1
1866
- if (defined ($data1 {$line })) { next ; }
1865
+ # Skip lines already in data1_ref
1866
+ if (defined ($data1_ref -> {$line })) { next ; }
1867
1867
1868
- # Copy count from data2
1869
- $result {$line } = $data2 {$line };
1868
+ # Copy count from data2_ref
1869
+ $result {$line } = $data2_ref -> {$line };
1870
1870
1871
1871
$found ++;
1872
1872
if ($result {$line } > 0) { $hit ++; }
0 commit comments