MSYS2-packages/lcov/002-mingw-lcov1.12-fix-undef-behaviour.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

38 lines
1.1 KiB
Diff

Author: Alastair McKinstry <mckinstry@debian.org>
Description: Fix for undefined behavior in perl5.20
Origin: http://bugs.debian.org/761308
Forwarded: no
Last-Updated: 2014-09-13
Index: lcov-1.12/bin/lcov
===================================================================
--- lcov-1.12.orig/bin/lcov
+++ lcov-1.12/bin/lcov
@@ -224,7 +224,9 @@ Getopt::Long::Configure("default");
# Remove spaces around rc options
my %new_opt_rc;
- while (my ($key, $value) = each(%opt_rc)) {
+ my @keys = keys %opt_rc;
+ for my $key (@keys) {
+ my $value = $opt_rc{$key};
$key =~ s/^\s+|\s+$//g;
$value =~ s/^\s+|\s+$//g;
Index: lcov-1.12/bin/geninfo
===================================================================
--- lcov-1.12.orig/bin/geninfo
+++ lcov-1.12/bin/geninfo
@@ -284,8 +284,9 @@ Getopt::Long::Configure("default");
{
# Remove spaces around rc options
my %new_opt_rc;
-
- while (my ($key, $value) = each(%opt_rc)) {
+ my @keys = keys %opt_rc;
+ for my $key (@keys) {
+ my $value = $opt_rc{$key};
$key =~ s/^\s+|\s+$//g;
$value =~ s/^\s+|\s+$//g;