Skip to content

Proper fix for 1fa30b7403176349557d6aea2f02a2075aa6f03b #4439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 w;
uint8_t b[4];
} s;
uint32_t u32;
uint8_t u8[4];
} w;

s.b[0] = a >> 0;
s.b[1] = a >> 8;
s.b[2] = a >> 16;
s.b[3] = a >> 24;
w.u8[0] = a >> 0;
w.u8[1] = a >> 8;
w.u8[2] = a >> 16;
w.u8[3] = a >> 24;

return s.w;
return w.u32;
}

static inline uint32_t fromle32(uint32_t a)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ typedef signed long long __int64_t;
typedef unsigned long long __uint64_t;
#endif

#define s8 int8_t
#define u8 uint8_t
#define s16 int16_t
#define u16 uint16_t
#define s32 int32_t
#define u32 uint32_t
#define s64 int64_t
#define u64 uint64_t
typedef int8_t s8;
typedef uint8_t u8;
typedef int16_t s16;
typedef uint16_t u16;
typedef int32_t s32;
typedef uint32_t u32;
typedef int64_t s64;
typedef uint64_t u64;

#ifdef CONFIG_MBED_ENABLED
#ifndef BOOL
Expand Down