mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-24 06:22:46 +00:00
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>
This commit is contained in:
parent
d1dc091980
commit
1eb159a295
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user