[PATCH]initialize the array of fs/ncpfs/inode.c

From: Harry Wei
Date: Sun Apr 10 2011 - 06:08:53 EST

Hi us,
When i compile the linux-, 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:

So i patch for it below.

Harry Wei.

From: Harry Wei <harryxiyou@xxxxxxxxx>
Signed-off-by: Harry Wei <harryxiyou@xxxxxxxxx>
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)
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)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/