linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] btrfs-progs: fix compilation warning in function btrfs_read_dev_super
@ 2014-07-15  7:25 Anand Jain
  0 siblings, 0 replies; only message in thread
From: Anand Jain @ 2014-07-15  7:25 UTC (permalink / raw)
  To: linux-btrfs

disk-io.c: In function ‘btrfs_read_dev_super’:
disk-io.c:1217: warning: ‘ret’ may be used uninitialized in this function

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk-io.c b/disk-io.c
index 142197a..d10d647 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1214,7 +1214,7 @@ int btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64 sb_bytenr,
 	u8 data[BTRFS_SUPER_INFO_SIZE];
 	struct btrfs_super_block *buf = (struct btrfs_super_block *) data;
 	int i;
-	int ret;
+	int ret = -ENOENT;
 	int max_super = super_recover ? BTRFS_SUPER_MIRROR_MAX : 1;
 	u64 transid = 0;
 	u64 bytenr;
-- 
2.0.0.153.g79dcccc


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-15  7:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15  7:25 [PATCH 1/1] btrfs-progs: fix compilation warning in function btrfs_read_dev_super Anand Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).