Skip to content

Fix LTO build failures due to duplicate local types #9158

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
Dec 20, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#define RFF_TX 0x04
#define RFF_CCA 0x08

namespace {

typedef enum {
RF_MODE_NORMAL = 0,
RF_MODE_SNIFFER = 1,
Expand Down Expand Up @@ -82,6 +84,8 @@ typedef enum {
STATE_TRANSITION_IN_PROGRESS = 0x1F
} rf_trx_states_t;

} // anonymous namespace

static const uint8_t *rf_tx_data; // Points to Nanostack's buffer
static uint8_t rf_tx_length;
/*ACK wait duration changes depending on data rate*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ extern "C" {
#define gXcvrLowPowerState_d gXcvrPwrAutodoze_c
#endif

namespace {

/* MCR20A XCVR states */
typedef enum xcvrState_tag {
gIdle_c,
Expand Down Expand Up @@ -106,6 +108,8 @@ typedef enum {
TX_ARET_ON = 0x19
} rf_trx_states_t;

} // anonymous namespace

/*RF receive buffer*/
static uint8_t rf_buffer[RF_BUFFER_SIZE];

Expand Down
4 changes: 4 additions & 0 deletions features/storage/kvstore/filesystemstore/FileSystemStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ static const uint32_t supported_flags = mbed::KVStore::WRITE_ONCE_FLAG;

using namespace mbed;

namespace {

// incremental set handle
typedef struct {
char *key;
Expand All @@ -53,6 +55,8 @@ typedef struct {
char *prefix;
} key_iterator_handle_t;

} // anonymous namespace

// Local Functions
static char *string_ndup(const char *src, size_t size);

Expand Down
4 changes: 4 additions & 0 deletions features/storage/kvstore/securestore/SecureStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ static const char *const auth_prefix = "AUTH";

static const uint32_t security_flags = KVStore::REQUIRE_CONFIDENTIALITY_FLAG | KVStore::REQUIRE_REPLAY_PROTECTION_FLAG;

namespace {

typedef struct {
uint16_t metadata_size;
uint16_t revision;
Expand All @@ -72,6 +74,8 @@ typedef struct {
KVStore::iterator_t underlying_it;
} key_iterator_handle_t;

} // anonymous namespace


// -------------------------------------------------- Local Functions Declaration ----------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions features/storage/kvstore/tdbstore/TDBStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ static const uint32_t delete_flag = (1UL << 31);
static const uint32_t internal_flags = delete_flag;
static const uint32_t supported_flags = KVStore::WRITE_ONCE_FLAG;

namespace {

typedef struct {
uint32_t magic;
uint16_t header_size;
Expand Down Expand Up @@ -93,6 +95,8 @@ typedef struct {
char *prefix;
} key_iterator_handle_t;

} // anonymous namespace


// -------------------------------------------------- Local Functions Declaration ----------------------------------------------------

Expand Down
22 changes: 13 additions & 9 deletions features/storage/nvstore/source/nvstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

// --------------------------------------------------------- Definitions ----------------------------------------------------------

namespace {

static const uint16_t delete_item_flag = 0x8000;
static const uint16_t set_once_flag = 0x4000;
static const uint16_t header_flag_mask = 0xF000;
Expand Down Expand Up @@ -72,6 +74,17 @@ static const int num_write_retries = 16;

static const uint8_t blank_flash_val = 0xFF;

typedef enum {
NVSTORE_AREA_STATE_NONE = 0,
NVSTORE_AREA_STATE_EMPTY,
NVSTORE_AREA_STATE_VALID,
} area_state_e;

static const uint32_t initial_crc = 0xFFFFFFFF;

} // anonymous namespace


// See whether any of these defines are given (by config files)
// If so, this means that that area configuration is given by the user
#if defined(NVSTORE_AREA_1_ADDRESS) || defined(NVSTORE_AREA_1_SIZE) ||\
Expand All @@ -95,15 +108,6 @@ NVStore::nvstore_area_data_t NVStore::initial_area_params[] = {{0, 0},
};
#endif

typedef enum {
NVSTORE_AREA_STATE_NONE = 0,
NVSTORE_AREA_STATE_EMPTY,
NVSTORE_AREA_STATE_VALID,
} area_state_e;

static const uint32_t initial_crc = 0xFFFFFFFF;


// -------------------------------------------------- Local Functions Declaration ----------------------------------------------------

// -------------------------------------------------- Functions Implementation ----------------------------------------------------
Expand Down