From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] afs: Fix compile warning in afs_dynroot_lookup()
Date: Thu, 19 Dec 2019 21:14:51 +0800 [thread overview]
Message-ID: <1576761291-30121-1-git-send-email-yangtiezhu@loongson.cn> (raw)
Fix the following compile warning:
CC fs/afs/dynroot.o
fs/afs/dynroot.c: In function ‘afs_dynroot_lookup’:
fs/afs/dynroot.c:117:6: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = lookup_one_len(name, dentry->d_parent, len);
^
fs/afs/dynroot.c:91:6: note: ‘len’ was declared here
int len;
^
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
fs/afs/dynroot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 7503899..303f712 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -88,7 +88,7 @@ static struct dentry *afs_lookup_atcell(struct dentry *dentry)
struct dentry *ret;
unsigned int seq = 0;
char *name;
- int len;
+ int len = 0;
if (!net->ws_cell)
return ERR_PTR(-ENOENT);
--
2.1.0
next reply other threads:[~2019-12-19 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 13:14 Tiezhu Yang [this message]
2019-12-27 0:06 ` [PATCH] afs: Fix compile warning in afs_dynroot_lookup() Al Viro
2019-12-27 9:10 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576761291-30121-1-git-send-email-yangtiezhu@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).