nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
PATCH 1/1 nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
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.
--- fs/nilfs2/btree.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nilfs2/btree.c +1 -1
@@ -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;
Signature · 6 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Ryusuke Konishi
AppliedQuoted 9 lines · Li Hong
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 functionfs/nilfs2/btree.c:1882: note: ‘maxlevel’ was declared hereSet maxlevel = 0 to fix it.
Signed-off-by Li Hong <[email protected]>
Applied, thanks.
Ryusuke Konishi
Quoted 25 lines
--- fs/nilfs2/btree.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nilfs2/btree.c +1
-1@@ -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;Signature · 7 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html