* grub-core/fs/btrfs.c (grub_btrfs_read_logical): Silence spurious

warning. Move variables before code while on it.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-15 10:23:02 +02:00
parent 5d063cdc10
commit 983b414d77
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2011-05-15 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/btrfs.c (grub_btrfs_read_logical): Silence spurious
warning. Move variables before code while on it.
2011-05-15 Vladimir Serbinenko <phcoder@gmail.com>
Fuloong support.

View file

@ -589,10 +589,14 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
struct grub_btrfs_key *key;
struct grub_btrfs_chunk_item *chunk;
grub_uint64_t csize;
grub_err_t err;
grub_err_t err = 0;
struct grub_btrfs_key key_out;
int challoc = 0;
grub_device_t dev;
struct grub_btrfs_key key_in;
grub_size_t chsize;
grub_disk_addr_t chaddr;
grub_dprintf ("btrfs", "searching for laddr %" PRIxGRUB_UINT64_T "\n",
addr);
for (ptr = data->sblock.bootstrap_mapping;
@ -616,9 +620,7 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
+ sizeof (struct grub_btrfs_chunk_stripe)
* grub_le_to_cpu16 (chunk->nstripes);
}
struct grub_btrfs_key key_in;
grub_size_t chsize;
grub_disk_addr_t chaddr;
key_in.object_id = GRUB_BTRFS_OBJECT_ID_CHUNK;
key_in.type = GRUB_BTRFS_ITEM_TYPE_CHUNK;
key_in.offset = addr;