]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hfsplus-fix-warnings-in-fs-hfsplus-bfindc-in-function-hfs_find_1st_rec_by_cnid-fix
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 23 Mar 2013 02:32:42 +0000 (13:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Mar 2013 05:11:30 +0000 (16:11 +1100)
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>
fs/hfsplus/bfind.c

index a953637ec9cd155664e0d038fcb3ef2e94c4cf55..bbfdc1707725a3078e66e0e6ce3928b4f5beb7ee 100644 (file)
@@ -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);