Skip to content

Commit

Permalink
lcov: Fix output files being created in / directory
Browse files Browse the repository at this point in the history
When a warning is emitted by lcov before creating an output file,
e.g. when a negative coverage count was found while combining
tracefiles, lcov tries to create the output file in the root
directory (/) instead of the current working directory.

This is a result of lcov's warn handler calling a temp file cleanup
routine that changes directories to / before trying to remove its
temporary directory.

Fix this by removing the temp cleanup call from the warn handler.

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
  • Loading branch information
oberpar committed Mar 8, 2016
1 parent e32aab1 commit 632c25a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion bin/lcov
Original file line number Diff line number Diff line change
Expand Up @@ -4250,7 +4250,6 @@ sub warn_handler($)
{
my ($msg) = @_;

temp_cleanup();
warn("$tool_name: $msg");
}

Expand Down

0 comments on commit 632c25a

Please sign in to comment.