btrfs: avoid "used uninitialized" error with GCC7
sblock was local and so considered new variable on every loop iteration. Closes: 50597
This commit is contained in:
parent
ec4af117c6
commit
6cef7f6079
1 changed files with 1 additions and 1 deletions
|
@ -227,11 +227,11 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
|||
static grub_err_t
|
||||
read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
|
||||
{
|
||||
struct grub_btrfs_superblock sblock;
|
||||
unsigned i;
|
||||
grub_err_t err = GRUB_ERR_NONE;
|
||||
for (i = 0; i < ARRAY_SIZE (superblock_sectors); i++)
|
||||
{
|
||||
struct grub_btrfs_superblock sblock;
|
||||
/* Don't try additional superblocks beyond device size. */
|
||||
if (i && (grub_le_to_cpu64 (sblock.this_device.size)
|
||||
>> GRUB_DISK_SECTOR_BITS) <= superblock_sectors[i])
|
||||
|
|
Loading…
Reference in a new issue