From: Harry Wei <jiaweiwei.xiyou@gmail.com>
To: petr@vandrovec.name, viro@zeniv.linux.org.uk, arnd@arndb.de,
npiggin@kernel.dk, jens.axboe@oracle.com, greg@kroah.com,
akpm@linux-foundation.org, joe@perches.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH]initialize the array of fs/ncpfs/inode.c
Date: Sun, 10 Apr 2011 18:08:18 +0800 [thread overview]
Message-ID: <20110410100816.GB4953@gmail.com> (raw)
Hi us,
When i compile the linux-2.6.38.2, some warnings happened
to me. One of them is like following.
fs/ncpfs/inode.c: In function 'ncp_fill_super':
fs/ncpfs/inode.c:451: warning: 'data.mounted_vol[1u]' may be used
uninitialized in this function
...
See details by the URL:
http://s1202.photobucket.com/albums/bb364/harrywei/Kernel/?action=view¤t=patched.png
So i patch for it below.
Thanks.
Harry Wei.
From: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Harry Wei <harryxiyou@gmail.com>
---
fs/ncpfs/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 00a1d1c..15f0ebb 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -30,6 +30,7 @@
#include <linux/mount.h>
#include <linux/seq_file.h>
#include <linux/namei.h>
+#include <linux/ncp.h>
#include <net/sock.h>
@@ -461,6 +462,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
#endif
struct ncp_entry_info finfo;
+ data.mounted_vol[NCP_VOLNAME_LEN + 1] = {0};
data.wdog_pid = NULL;
server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
if (!server)
--
1.7.0.4
next reply other threads:[~2011-04-10 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 10:08 Harry Wei [this message]
2011-04-11 23:18 ` [PATCH]initialize the array of fs/ncpfs/inode.c Andrew Morton
2011-04-11 23:28 ` Tim Gardner
2011-04-12 3:17 ` Harry Wei
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=20110410100816.GB4953@gmail.com \
--to=jiaweiwei.xiyou@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=jens.axboe@oracle.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=petr@vandrovec.name \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.