public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]initialize the array of fs/ncpfs/inode.c
@ 2011-04-10 10:08 Harry Wei
  2011-04-11 23:18 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Wei @ 2011-04-10 10:08 UTC (permalink / raw)
  To: petr, viro, arnd, npiggin, jens.axboe, greg, akpm, joe; +Cc: linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-12  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 10:08 [PATCH]initialize the array of fs/ncpfs/inode.c Harry Wei
2011-04-11 23:18 ` Andrew Morton
2011-04-11 23:28   ` Tim Gardner
2011-04-12  3:17   ` Harry Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox