Linux NILFS development
 help / color / mirror / Atom feed
* [PATCH] nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
@ 2010-04-02 10:40 Li Hong
  2010-04-02 11:09 ` Ryusuke Konishi
  0 siblings, 1 reply; 2+ messages in thread
From: Li Hong @ 2010-04-02 10:40 UTC (permalink / raw)
  To: KONISHI Ryusuke, linux-nilfs-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA

`make CONFIG_NILFS2_FS=m M=fs/nilfs2/` will give the following warnings:

fs/nilfs2/btree.c: In function ‘nilfs_btree_propagate’:
fs/nilfs2/btree.c:1882: warning: ‘maxlevel’ may be used uninitialized in this function
fs/nilfs2/btree.c:1882: note: ‘maxlevel’ was declared here

Set maxlevel = 0 to fix it.

Signed-off-by: Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 fs/nilfs2/btree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 7cdd98b..76c38e3 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -1879,7 +1879,7 @@ static int nilfs_btree_propagate_v(struct nilfs_btree *btree,
 				   struct nilfs_btree_path *path,
 				   int level, struct buffer_head *bh)
 {
-	int maxlevel, ret;
+	int maxlevel = 0, ret;
 	struct nilfs_btree_node *parent;
 	struct inode *dat = nilfs_bmap_get_dat(&btree->bt_bmap);
 	__u64 ptr;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-04-02 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 10:40 [PATCH] nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v() Li Hong
2010-04-02 11:09 ` Ryusuke Konishi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox