From: Anatolij Gustschin Date: Mon, 12 Dec 2011 03:16:17 +0000 (+0000) Subject: fs/reiserfs/reiserfs.c: Fix compiler warning X-Git-Tag: v2011.12-rc1~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fa75f515616729ccec4c406cb88450aa8045a5e9;p=oweals%2Fu-boot.git fs/reiserfs/reiserfs.c: Fix compiler warning Fix: reiserfs.c: In function 'reiserfs_mount': reiserfs.c:360:22: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Anatolij Gustschin --- diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c index d84fb20bc7..efab8fa844 100644 --- a/fs/reiserfs/reiserfs.c +++ b/fs/reiserfs/reiserfs.c @@ -282,6 +282,7 @@ reiserfs_mount (unsigned part_length) { struct reiserfs_super_block super; int superblock = REISERFS_DISK_OFFSET_IN_BYTES >> SECTOR_BITS; + char *cache; if (part_length < superblock + (sizeof (super) >> SECTOR_BITS) || ! reiserfs_devread (superblock, 0, sizeof (struct reiserfs_super_block), @@ -357,7 +358,8 @@ reiserfs_mount (unsigned part_length) if (! block_read (sb_root_block(&super), 0, INFO->blocksize, (char*) ROOT)) return 0; - INFO->tree_depth = __le16_to_cpu(BLOCKHEAD (ROOT)->blk_level); + cache = ROOT; + INFO->tree_depth = __le16_to_cpu(BLOCKHEAD (cache)->blk_level); #ifdef REISERDEBUG printf ("root read_in: block=%d, depth=%d\n",