Skip to content
Snippets Groups Projects
Commit fa75f515 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Wolfgang Denk
Browse files

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: default avatarAnatolij Gustschin <agust@denx.de>
parent 99f2c768
Branches
Tags
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment