diff options
author | Daniel Mack <zonque@gmail.com> | 2012-08-28 04:38:03 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2012-09-03 11:44:06 -0400 |
commit | 381bf7cad9dbce701c618f8942fd35954952ef39 (patch) | |
tree | 11da5214a5b7325df57028eda31fde3d1739a6db /fs/fuse/control.c | |
parent | 8d39d801d64658d7d69e4754f287a71e9f9bbcb8 (diff) |
fuse: mark variables uninitialized
gcc 4.6.3 complains about uninitialized variables in fs/fuse/control.c:
CC fs/fuse/control.o
fs/fuse/control.c: In function 'fuse_conn_congestion_threshold_write':
fs/fuse/control.c:165:29: warning: 'val' may be used uninitialized in this function [-Wuninitialized]
fs/fuse/control.c: In function 'fuse_conn_max_background_write':
fs/fuse/control.c:128:23: warning: 'val' may be used uninitialized in this function [-Wuninitialized]
fuse_conn_limit_write() will always return non-zero unless the &val
is modified, so the warning is misleading. Let the compiler know
about it by marking 'val' with 'uninitialized_var'.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Brian Foster <bfoster@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/control.c')
-rw-r--r-- | fs/fuse/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 03ff5b1eba93..75a20c092dd4 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c | |||
@@ -117,7 +117,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file, | |||
117 | const char __user *buf, | 117 | const char __user *buf, |
118 | size_t count, loff_t *ppos) | 118 | size_t count, loff_t *ppos) |
119 | { | 119 | { |
120 | unsigned val; | 120 | unsigned uninitialized_var(val); |
121 | ssize_t ret; | 121 | ssize_t ret; |
122 | 122 | ||
123 | ret = fuse_conn_limit_write(file, buf, count, ppos, &val, | 123 | ret = fuse_conn_limit_write(file, buf, count, ppos, &val, |
@@ -154,7 +154,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file, | |||
154 | const char __user *buf, | 154 | const char __user *buf, |
155 | size_t count, loff_t *ppos) | 155 | size_t count, loff_t *ppos) |
156 | { | 156 | { |
157 | unsigned val; | 157 | unsigned uninitialized_var(val); |
158 | ssize_t ret; | 158 | ssize_t ret; |
159 | 159 | ||
160 | ret = fuse_conn_limit_write(file, buf, count, ppos, &val, | 160 | ret = fuse_conn_limit_write(file, buf, count, ppos, &val, |