From eed3c8a6eccaaa5680d4d358e4c996d38576ca83 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Feb 2014 20:17:01 +0100 Subject: [PATCH] lcov: Don't warn about missing source files Another upstream patch for compatibility with current GCCs. --- .../tools/analysis/lcov/default.nix | 2 +- .../tools/analysis/lcov/no-warn-missing.patch | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/analysis/lcov/no-warn-missing.patch diff --git a/pkgs/development/tools/analysis/lcov/default.nix b/pkgs/development/tools/analysis/lcov/default.nix index 92e53204a34e..9ad34097d0b1 100644 --- a/pkgs/development/tools/analysis/lcov/default.nix +++ b/pkgs/development/tools/analysis/lcov/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; patches = - [ ./lcov-except-unreach.patch ] + [ ./lcov-except-unreach.patch ./no-warn-missing.patch ] ++ stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch; preBuild = '' diff --git a/pkgs/development/tools/analysis/lcov/no-warn-missing.patch b/pkgs/development/tools/analysis/lcov/no-warn-missing.patch new file mode 100644 index 000000000000..fa1f476fba0f --- /dev/null +++ b/pkgs/development/tools/analysis/lcov/no-warn-missing.patch @@ -0,0 +1,54 @@ +http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/geninfo?view=log + +--- a/bin/geninfo 2013/01/10 09:02:32 1.119 ++++ b/bin/geninfo 2013/02/22 14:09:08 1.120 +@@ -864,7 +864,6 @@ + my $source; # gcov source header information + my $object; # gcov object header information + my @matches; # List of absolute paths matching filename +- my @unprocessed; # List of unprocessed source code files + my $base_dir; # Base directory for current file + my @tmp_links; # Temporary links to be cleaned up + my @result; +@@ -1060,7 +1059,6 @@ + + # Traverse the list of generated .gcov files and combine them into a + # single .info file +- @unprocessed = keys(%{$instr}); + foreach $gcov_file (sort(@gcov_list)) + { + my $i; +@@ -1143,16 +1141,6 @@ + \@matches, \@gcov_content); + } + +- # Remove processed file from list +- for ($index = scalar(@unprocessed) - 1; $index >= 0; $index--) +- { +- if ($unprocessed[$index] eq $source_filename) +- { +- splice(@unprocessed, $index, 1); +- last; +- } +- } +- + # Skip external files if requested + if (!$opt_external) { + if (is_external($source_filename)) { +@@ -1297,16 +1285,6 @@ + unlink($gcov_file); + } + +- # Check for files which show up in the graph file but were never +- # processed +- if (@unprocessed && @gcov_list) +- { +- foreach (@unprocessed) +- { +- warn("WARNING: no data found for $_\n"); +- } +- } +- + if (!($output_filename && ($output_filename eq "-"))) + { + close(INFO_HANDLE);