linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hfsplus: fix warnings in fs/hfsplus/bfind.c: In function 'hfs_find_1st_rec_by_cnid'
@ 2013-03-03 15:26 Vyacheslav Dubeyko
  2013-03-07 19:18 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Vyacheslav Dubeyko @ 2013-03-03 15:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-fsdevel, Christoph Hellwig, Al Viro, Hin-Tak Leung,
	Fengguang Wu

From: Vyacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH] hfsplus: fix warnings in fs/hfsplus/bfind.c: In function 'hfs_find_1st_rec_by_cnid'

This patch fixes warnings fs/hfsplus/bfind.c: In function 'hfs_find_1st_rec_by_cnid':
(1) include/uapi/linux/swab.h:60:2: warning: 'search_cnid' may be used uninitialized in this function [-Wmaybe-uninitialized]
(2) include/uapi/linux/swab.h:60:2: warning: 'cur_cnid' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
---
 fs/hfsplus/bfind.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index d73c98d..a953637 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -56,7 +56,8 @@ int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode,
 				int *end,
 				int *cur_rec)
 {
-	__be32 cur_cnid, search_cnid;
+	__be32 cur_cnid = 0;
+	__be32 search_cnid = 0;
 
 	if (bnode->tree->cnid == HFSPLUS_EXT_CNID) {
 		cur_cnid = fd->key->ext.cnid;
-- 
1.7.9.5




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

end of thread, other threads:[~2013-03-09  0:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 15:26 [PATCH] hfsplus: fix warnings in fs/hfsplus/bfind.c: In function 'hfs_find_1st_rec_by_cnid' Vyacheslav Dubeyko
2013-03-07 19:18 ` Andrew Morton
2013-03-08 13:15   ` Vyacheslav Dubeyko
2013-03-08 22:29     ` Andrew Morton
2013-03-09  0:28       ` Fengguang Wu

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).