btrfs-progs: fix unaligned compat endian warnings

The _una_ struct's entire job is to pass an argument to le*_to_cpu.  So
it's a little embarassing that it uses a native cpu types and generates
endian warnings.

ctree.h:1616:1: warning: incorrect type in assignment (different base types)
ctree.h:1616:1:    expected unsigned long long [unsigned] [usertype] x
ctree.h:1616:1:    got restricted __le64 [usertype] <noident>

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
master
Zach Brown 2013-08-14 16:16:42 -07:00 committed by David Sterba
parent d1dc091980
commit 1eb159a295
1 changed files with 3 additions and 3 deletions

View File

@ -278,9 +278,9 @@ typedef u64 __bitwise __be64;
#define le16_to_cpu(x) ((__force u16)(__le16)(x))
#endif
struct __una_u16 { u16 x; } __attribute__((__packed__));
struct __una_u32 { u32 x; } __attribute__((__packed__));
struct __una_u64 { u64 x; } __attribute__((__packed__));
struct __una_u16 { __le16 x; } __attribute__((__packed__));
struct __una_u32 { __le32 x; } __attribute__((__packed__));
struct __una_u64 { __le64 x; } __attribute__((__packed__));
#define get_unaligned_le8(p) (*((u8 *)(p)))
#define put_unaligned_le8(val,p) ((*((u8 *)(p))) = (val))