fuse: fix "uninitialized variable" warning
authorRajat Jain <rajatxjain@gmail.com>
Wed, 5 Feb 2014 23:24:57 +0000 (15:24 -0800)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 2 Apr 2014 13:38:51 +0000 (15:38 +0200)
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>
fs/fuse/file.c

index d03a35d3197e2604cfca43ddc936fb0a8a44bf00..65df7d8be4f587cbc703e3885b6f9a1d4050ffe0 100644 (file)
@@ -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);