Skip to content

Commit

Permalink
fuse: fix "uninitialized variable" warning
Browse files Browse the repository at this point in the history
Fix the following warning:

In file included from include/linux/fs.h:16:0,
                 from fs/fuse/fuse_i.h:13,
                 from fs/fuse/file.c:9:
fs/fuse/file.c: In function 'fuse_file_poll':
include/linux/rbtree.h:82:28: warning: 'parent' may be used
uninitialized in this function [-Wmaybe-uninitialized]
fs/fuse/file.c:2592:27: note: 'parent' was declared here

Signed-off-by: Rajat Jain <rajatxjain@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Rajat Jain authored and Miklos Szeredi committed Apr 2, 2014
1 parent 4d99ff8 commit f384626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2772,7 +2772,7 @@ static void fuse_register_polled_file(struct fuse_conn *fc,
{
spin_lock(&fc->lock);
if (RB_EMPTY_NODE(&ff->polled_node)) {
struct rb_node **link, *parent;
struct rb_node **link, *uninitialized_var(parent);

link = fuse_find_polled_node(fc, ff->kh, &parent);
BUG_ON(*link);
Expand Down

0 comments on commit f384626

Please sign in to comment.