cuse: fix uninitialized variable warnings
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 15 Jan 2013 11:24:46 +0000 (12:24 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 17 Jan 2013 12:05:52 +0000 (13:05 +0100)
Fix the following compiler warnings:

fs/fuse/cuse.c: In function 'cuse_process_init_reply':
fs/fuse/cuse.c:288:24: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/fuse/cuse.c:272:14: note: 'val' was declared here
fs/fuse/cuse.c:284:10: warning: 'key' may be used uninitialized in this function [-Wmaybe-uninitialized]
fs/fuse/cuse.c:272:8: note: 'key' was declared here

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/cuse.c

index 2a2797e2abc5e38514d5a95c35a2d4549f173b18..e397b675b029a6e9f2d6f7f59a0d73acec412fbe 100644 (file)
@@ -266,7 +266,7 @@ static int cuse_parse_one(char **pp, char *end, char **keyp, char **valp)
 static int cuse_parse_devinfo(char *p, size_t len, struct cuse_devinfo *devinfo)
 {
        char *end = p + len;
-       char *key, *val;
+       char *uninitialized_var(key), *uninitialized_var(val);
        int rc;
 
        while (true) {