From: Noah Misch Date: Sun, 7 Jun 2020 23:27:13 +0000 (-0700) Subject: MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS. X-Git-Tag: REL_10_14~72 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=c34dd43f409e8f51a54e2cf4b151c9c0a411cccb;p=postgresql-pgindent.git MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS. Commit 7be5d8df1f74b78620167d3abf32ee607e728919 surfaced the logic error, which had no functional implications, by adding "use warnings". The buildfarm always customizes PROVE_FLAGS, so the warning did not appear there. Back-patch to 9.5 (all supported versions). --- diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 155f835832..4432c7cb73 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -190,7 +190,7 @@ sub tap_check unless $config->{tap_tests}; my @flags; - foreach my $arg (0 .. scalar(@_)) + foreach my $arg (0 .. scalar(@_) - 1) { next unless $_[$arg] =~ /^PROVE_FLAGS=(.*)/; @flags = split(/\s+/, $1);