From 109d5a90e6708f55a1e4df86e58e730000feef67 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Mar 2013 15:08:25 +1100 Subject: [PATCH] hfsplus-fix-warnings-in-fs-hfsplus-bfindc-in-function-hfs_find_1st_rec_by_cnid-fix make the workaround more explicit Cc: Vyacheslav Dubeyko Cc: Christoph Hellwig Signed-off-by: Andrew Morton --- fs/hfsplus/bfind.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c index a953637ec9cd..bbfdc1707725 100644 --- a/fs/hfsplus/bfind.c +++ b/fs/hfsplus/bfind.c @@ -56,8 +56,8 @@ int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, int *end, int *cur_rec) { - __be32 cur_cnid = 0; - __be32 search_cnid = 0; + __be32 cur_cnid; + __be32 search_cnid; if (bnode->tree->cnid == HFSPLUS_EXT_CNID) { cur_cnid = fd->key->ext.cnid; @@ -68,8 +68,11 @@ int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, } else if (bnode->tree->cnid == HFSPLUS_ATTR_CNID) { cur_cnid = fd->key->attr.cnid; search_cnid = fd->search_key->attr.cnid; - } else + } else { + cur_cnid = 0; /* used-uninitialized warning */ + search_cnid = 0; BUG(); + } if (cur_cnid == search_cnid) { (*end) = (*cur_rec); -- 2.39.5