summaryrefslogtreecommitdiff
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-03-23 13:32:42 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-03-25 15:15:15 +1100
commit91fac090d6021521bdc59c5828a8e38924b8f2d5 (patch)
treebc6107a438562880ac378c191f19f7f06ceccab9 /fs/hfsplus
parent8f3b083750cbdf129ac88b281c2e953759f366a2 (diff)
hfsplus-fix-warnings-in-fs-hfsplus-bfindc-in-function-hfs_find_1st_rec_by_cnid-fix
make the workaround more explicit Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/bfind.c9
1 files 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);