Skip to content

Commit

Permalink
Resolve conflict in builtin type names
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sg- committed Jun 3, 2017
1 parent be35b3f commit 1fa30b7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions features/filesystem/bd/MBRBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1fa30b7

Please sign in to comment.