lkml.org 
[lkml]   [2011]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH]initialize the array of fs/ncpfs/inode.c
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&current=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


\
 
 \ /
  Last update: 2011-04-10 12:11    [W:0.063 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site