MSYS2-packages/lcov/001-mingw-lcov1.12-handle-equals-signs.patch
Christoph Reiter f6bb73a1eb Revert "lcov: update to 2.0"
This reverts commit 23545c636cee649bddb35449bd985a24fed895aa.

See https://github.com/msys2/MSYS2-packages/pull/4036#issuecomment-1712763143
2023-09-10 11:23:40 +02:00

24 lines
858 B
Diff

Description: Handle "=====" as another form of zero.
gcov prints "=====" instead of "######" when an unexecuted line is
"reachable only by exceptional paths such as C++ exception handlers."
This should be handled the same as "######" for our purposes.
Author: Zack Weinberg <zackw@panix.com>
Last-Update: 2013-02-01
Index: lcov-1.12/bin/geninfo
===================================================================
--- lcov-1.12.orig/bin/geninfo
+++ lcov-1.12/bin/geninfo
@@ -1771,8 +1771,9 @@ sub read_gcov_file($)
$number = (split(" ",substr($_, 0, 16)))[0];
# Check for zero count which is indicated
- # by ######
- if ($number eq "######") { $number = 0; }
+ # by ###### or =====
+ if ($number eq "######" or
+ $number eq "=====") { $number = 0; }
if ($exclude_line) {
# Register uninstrumented line instead