linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: fix a compiler warning of may be used uninitialized
@ 2015-09-02  7:19 Zhao Lei
  2015-09-29 14:21 ` David Sterba
  0 siblings, 1 reply; 5+ messages in thread
From: Zhao Lei @ 2015-09-02  7:19 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

Not real problem, just avoid warning of:
 fs/btrfs/inode-map.c: In function 'btrfs_unpin_free_ino':
 fs/btrfs/inode-map.c:252: warning: 'count' may be used uninitialized in this function
In gcc 4.8.3

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 fs/btrfs/inode-map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index d4a582a..e094e3b 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -249,7 +249,7 @@ void btrfs_unpin_free_ino(struct btrfs_root *root)
 	spinlock_t *rbroot_lock = &root->free_ino_pinned->tree_lock;
 	struct btrfs_free_space *info;
 	struct rb_node *n;
-	u64 count;
+	u64 count = 0;
 
 	if (!btrfs_test_opt(root, INODE_MAP_CACHE))
 		return;
-- 
1.8.5.1


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

end of thread, other threads:[~2015-09-30 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02  7:19 [PATCH] btrfs: fix a compiler warning of may be used uninitialized Zhao Lei
2015-09-29 14:21 ` David Sterba
2015-09-30  3:55   ` Zhao Lei
2015-09-30  8:18     ` Holger Hoffstätte
2015-09-30 14:58     ` David Sterba

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