summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-12-12 03:16:17 +0000
committerWolfgang Denk <wd@denx.de>2011-12-12 14:25:30 +0100
commitfa75f515616729ccec4c406cb88450aa8045a5e9 (patch)
treef27070efb678b262c41d44a6c6ee692068b5fd72 /fs
parent99f2c76821e4ba84be1f5cc0a9d06582a2d56df6 (diff)
downloadu-boot-imx-fa75f515616729ccec4c406cb88450aa8045a5e9.zip
u-boot-imx-fa75f515616729ccec4c406cb88450aa8045a5e9.tar.gz
u-boot-imx-fa75f515616729ccec4c406cb88450aa8045a5e9.tar.bz2
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 <agust@denx.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/reiserfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/reiserfs/reiserfs.c b/fs/reiserfs/reiserfs.c
index d84fb20..efab8fa 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",