From: proski Date: Tue, 15 Jul 2008 04:12:28 +0000 (+0000) Subject: 2008-07-15 Pavel Roskin X-Git-Tag: 1.98~1410 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee01cf35f07d1ad5971c90fb40dcab21a3e9e641;p=thirdparty%2Fgrub.git 2008-07-15 Pavel Roskin * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the beginning to avoid warnings with some compilers. --- diff --git a/ChangeLog b/ChangeLog index d304676e4..a037e3a19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-15 Pavel Roskin + * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the + beginning to avoid warnings with some compilers. + * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h. [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast. diff --git a/fs/ext2.c b/fs/ext2.c index 7a002f56a..81318f882 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -336,7 +336,7 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) { struct grub_ext2_data *data = node->data; struct grub_ext2_inode *inode = &node->inode; - int blknr; + int blknr = -1; unsigned int blksz = EXT2_BLOCK_SIZE (data); int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data); @@ -428,7 +428,6 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) { grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "ext2fs doesn't support triple indirect blocks"); - blknr = -1; } return blknr;