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>
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;
}
/**