diff options
author | Dirk Behme <dirk.behme@googlemail.com> | 2010-12-25 10:58:46 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2011-01-11 11:09:36 +0100 |
commit | c7b7d4550d0178dc302c808f974a7beb0f80d3e1 (patch) | |
tree | 518613d7ef2e89409950a4e24c82d1e825658982 /fs/ubifs | |
parent | 0e7790d450000c1a2cda40458adb28707eaa5041 (diff) | |
download | u-boot-c7b7d4550d0178dc302c808f974a7beb0f80d3e1.tar.gz u-boot-c7b7d4550d0178dc302c808f974a7beb0f80d3e1.tar.bz2 u-boot-c7b7d4550d0178dc302c808f974a7beb0f80d3e1.zip |
UBIFS: Fix dereferencing type-punned pointer compiler warning
Fix compiler warning
In file included from ubifs.h:2137:0,
from ubifs.c:26:
misc.h: In function 'ubifs_idx_key':
misc.h:263:26: warning: dereferencing type-punned pointer will break strict-aliasing rules
seen with gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50).
No functional change.
CC: Stefan Roese <sr@denx.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/misc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index b745d86783..609232e931 100644 --- a/fs/ubifs/misc.h +++ b/fs/ubifs/misc.h @@ -260,7 +260,8 @@ struct ubifs_branch *ubifs_idx_branch(const struct ubifs_info *c, static inline void *ubifs_idx_key(const struct ubifs_info *c, const struct ubifs_idx_node *idx) { - return (void *)((struct ubifs_branch *)idx->branches)->key; + const __u8 *branch = idx->branches; + return (void *)((struct ubifs_branch *)branch)->key; } /** |