linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Btrfs: silence a compiler warning
@ 2012-02-22  7:30 Dan Carpenter
  2012-02-22 16:29 ` David Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2012-02-22  7:30 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-btrfs, kernel-janitors

Gcc warns that "ret" can be used uninitialized.  It can't actually be
used uninitialized because btrfs_num_copies() always returns 1 or more.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 064b29b..c053e90 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -643,7 +643,7 @@ static struct btrfsic_dev_state *btrfsic_dev_state_hashtable_lookup(
 static int btrfsic_process_superblock(struct btrfsic_state *state,
 				      struct btrfs_fs_devices *fs_devices)
 {
-	int ret;
+	int ret = 0;
 	struct btrfs_super_block *selected_super;
 	struct list_head *dev_head = &fs_devices->devices;
 	struct btrfs_device *device;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-22 19:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22  7:30 [patch] Btrfs: silence a compiler warning Dan Carpenter
2012-02-22 16:29 ` David Brown
2012-02-22 16:37   ` Dan Carpenter
2012-02-22 19:41   ` [patch v2] " Dan Carpenter

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).