]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-07-15 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Tue, 15 Jul 2008 04:12:28 +0000 (04:12 +0000)
committerproski <proski@localhost>
Tue, 15 Jul 2008 04:12:28 +0000 (04:12 +0000)
* fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
beginning to avoid warnings with some compilers.

ChangeLog
fs/ext2.c

index d304676e47f5e6d7ae4b70a91091dc1f7da6eaee..a037e3a19687f748d95db98f56c95ce78cac224a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-07-15  Pavel Roskin  <proski@gnu.org>
 
+       * 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.
 
index 7a002f56a0e5f2988c15148dd9f6e8793636c665..81318f882bed907a21bfc0a1719f8080acfe9b9f 100644 (file)
--- 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;