mirror of https://github.com/ARMmbed/mbed-os.git
Resolve conflict in builtin type names
In class MBRBlockDevice the tole32 function had used union member names u32 and u8. The introduction of REALTEK_RTL8195AM cauesd a conflict with type names in basic_types given they're aliased as macros to uint32_t and uint8_t respectively.pull/4438/head
parent
be35b3fb81
commit
1fa30b7403
|
@ -38,16 +38,16 @@ MBED_PACKED(struct) mbr_table {
|
|||
static inline uint32_t tole32(uint32_t a)
|
||||
{
|
||||
union {
|
||||
uint32_t u32;
|
||||
uint8_t u8[4];
|
||||
} w;
|
||||
uint32_t w;
|
||||
uint8_t b[4];
|
||||
} s;
|
||||
|
||||
w.u8[0] = a >> 0;
|
||||
w.u8[1] = a >> 8;
|
||||
w.u8[2] = a >> 16;
|
||||
w.u8[3] = a >> 24;
|
||||
s.b[0] = a >> 0;
|
||||
s.b[1] = a >> 8;
|
||||
s.b[2] = a >> 16;
|
||||
s.b[3] = a >> 24;
|
||||
|
||||
return w.u32;
|
||||
return s.w;
|
||||
}
|
||||
|
||||
static inline uint32_t fromle32(uint32_t a)
|
||||
|
|
Loading…
Reference in New Issue