From 5da2b9f1306cdf5dba3ad9de55d2897ffcc4d338 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Nov 2021 11:36:50 +0000 Subject: [PATCH] tests/gdisk/test-expand-gpt.pl: Fix some warnings "my" variable $output masks earlier declaration in same scope at ./gdisk/test-expand-gpt.pl line 73. "my" variable $end_sectors masks earlier declaration in same scope at ./gdisk/test-expand-gpt.pl line 78. --- tests/gdisk/test-expand-gpt.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gdisk/test-expand-gpt.pl b/tests/gdisk/test-expand-gpt.pl index f17d034ee..4f06d4144 100755 --- a/tests/gdisk/test-expand-gpt.pl +++ b/tests/gdisk/test-expand-gpt.pl @@ -70,12 +70,12 @@ sub tests { die if $g->part_expand_gpt ("/dev/sda"); - my $output = $g->debug ("sh", ["sgdisk", "-p", "/dev/sda"]); + $output = $g->debug ("sh", ["sgdisk", "-p", "/dev/sda"]); die if $output eq ""; $output =~ s/\n/ /g; $output =~ s/.*last usable sector is (\d+).*/$1/g; - my $end_sectors = 50 * 1024 * 2 - $output; + $end_sectors = 50 * 1024 * 2 - $output; die unless $end_sectors <= 34; }