Skip to contentSkip to conversation

ext4: inode: Fix compiler warning

PATCH New Stratos Karafotis 1 participant 1 message Jun 5, 2013 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: inode: Fix compiler warning

Fix the following compiler warning:

fs/ext4/inode.c: In function ‘ext4_da_writepages’:
fs/ext4/inode.c:2212:6: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/ext4/inode.c:2155:6: note: ‘err’ was declared here

---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -1
index 442c5d2..702428c 100644
@@ -2152,7 +2152,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,
 {
 	struct inode *inode = mpd->inode;
 	struct ext4_map_blocks *map = &mpd->map;
-	int err;
+	int err = 0;
 	loff_t disksize;
 
 	mpd->io_submit.io_end->offset =
Signature · 1 line
1.8.1.4