提交 b1375d64 编写于 作者: J Jan Schmidt 提交者: Chris Mason

Btrfs: fix uninit warning in backref.c

Added initialization with the declaration of ret. It isn't set later on the
switch-default branch (which should never be taken).
Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 96bdc7dc
...@@ -297,7 +297,7 @@ static int __add_delayed_refs(struct btrfs_delayed_ref_head *head, u64 seq, ...@@ -297,7 +297,7 @@ static int __add_delayed_refs(struct btrfs_delayed_ref_head *head, u64 seq,
struct btrfs_delayed_extent_op *extent_op = head->extent_op; struct btrfs_delayed_extent_op *extent_op = head->extent_op;
struct rb_node *n = &head->node.rb_node; struct rb_node *n = &head->node.rb_node;
int sgn; int sgn;
int ret; int ret = 0;
if (extent_op && extent_op->update_key) if (extent_op && extent_op->update_key)
btrfs_disk_key_to_cpu(info_key, &extent_op->key); btrfs_disk_key_to_cpu(info_key, &extent_op->key);
...@@ -392,7 +392,7 @@ static int __add_inline_refs(struct btrfs_fs_info *fs_info, ...@@ -392,7 +392,7 @@ static int __add_inline_refs(struct btrfs_fs_info *fs_info,
struct btrfs_key *info_key, int *info_level, struct btrfs_key *info_key, int *info_level,
struct list_head *prefs) struct list_head *prefs)
{ {
int ret; int ret = 0;
int slot; int slot;
struct extent_buffer *leaf; struct extent_buffer *leaf;
struct btrfs_key key; struct btrfs_key key;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册