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.
This commit is contained in:
Richard W.M. Jones
2021-11-09 11:36:50 +00:00
parent 60e9232f4e
commit 5da2b9f130

View File

@@ -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;
}