This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=bfd87b4683fc82f84eb131044b477758395c2643

commit bfd87b4683fc82f84eb131044b477758395c2643
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Mar 4 22:55:21 2023 +0100

    test: Reduce scope of variable to avoid shadowing others
    
    This is a global variable that was then being shadowed by other
    variables with the same name in inner scopes.
    
    Warned-by: perlcritic
    Addresses: Variables::ProhibitReusedNames
---
 scripts/t/Dpkg_Changelog.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/t/Dpkg_Changelog.t b/scripts/t/Dpkg_Changelog.t
index 4d046fec1..c3e741364 100644
--- a/scripts/t/Dpkg_Changelog.t
+++ b/scripts/t/Dpkg_Changelog.t
@@ -51,7 +51,6 @@ foreach my $file ("$datadir/countme", "$datadir/shadow", 
"$datadir/fields",
     my @data = @$changes;
     ok(@data, 'data is not empty');
 
-    my $str;
     if ($file eq "$datadir/countme") {
        # test range options
        cmp_ok(@data, '==', 7, 'no options -> count');
@@ -357,6 +356,7 @@ Xb-Userfield2: foobar
        skip('avoid spurious warning with only one entry', 2)
            if @data == 1;
 
+        my $str;
        my $oldest_version = $data[-1]->{Version};
        $str = $changes->format_range('dpkg', { since => $oldest_version });
 

-- 
Dpkg.Org's dpkg

Reply via email to