diff options
author | Richard Weinberger <richard@nod.at> | 2016-12-14 05:09:25 -0500 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-12-14 11:39:21 -0500 |
commit | ba75d570b60c05cda21c0b43c5fbdc4e344f892d (patch) | |
tree | af08ba1fbf4d5a0d650eb6eccfbb59623c8ac7fa /fs/ubifs | |
parent | ec9160dacdb08eaeb40a878db97dfed6c2212d91 (diff) |
ubifs: Initialize fstr_real_len
While fstr_real_len is only being used under if (encrypted),
gcc-6 still warns.
Fixes this false positive:
fs/ubifs/dir.c: In function 'ubifs_readdir':
fs/ubifs/dir.c:629:13: warning: 'fstr_real_len' may be used
uninitialized in this function [-Wmaybe-uninitialized]
fstr.len = fstr_real_len
Initialize fstr_real_len to make gcc happy.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 7f01f3d2ac3b..1c5331ac9614 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -528,7 +528,7 @@ static unsigned int vfs_dent_type(uint8_t type) | |||
528 | */ | 528 | */ |
529 | static int ubifs_readdir(struct file *file, struct dir_context *ctx) | 529 | static int ubifs_readdir(struct file *file, struct dir_context *ctx) |
530 | { | 530 | { |
531 | int fstr_real_len, err = 0; | 531 | int fstr_real_len = 0, err = 0; |
532 | struct fscrypt_name nm; | 532 | struct fscrypt_name nm; |
533 | struct fscrypt_str fstr = {0}; | 533 | struct fscrypt_str fstr = {0}; |
534 | union ubifs_key key; | 534 | union ubifs_key key; |