[M487] Fix compile warnings with IAR toolchain

pull/4608/head
ccli8 2017-08-03 13:33:17 +08:00
parent 99d12b1eb8
commit afb5aba8d9
3 changed files with 8 additions and 6 deletions

View File

@ -44,13 +44,13 @@ struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4)));
struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4))); struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4)));
#endif #endif
*/ */
struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] MBED_ALIGN(4); MBED_ALIGN(4) struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM];
struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] MBED_ALIGN(4); MBED_ALIGN(4) struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM];
struct eth_descriptor volatile *cur_tx_desc_ptr, *cur_rx_desc_ptr, *fin_tx_desc_ptr; struct eth_descriptor volatile *cur_tx_desc_ptr, *cur_rx_desc_ptr, *fin_tx_desc_ptr;
u8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] MBED_ALIGN(4); MBED_ALIGN(4) u8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE];
u8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] MBED_ALIGN(4); MBED_ALIGN(4) u8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE];
extern void ethernetif_input(u16_t len, u8_t *buf, u32_t s, u32_t ns); extern void ethernetif_input(u16_t len, u8_t *buf, u32_t s, u32_t ns);
extern void ethernetif_loopback_input(struct pbuf *p); extern void ethernetif_loopback_input(struct pbuf *p);

View File

@ -56,8 +56,8 @@ extern volatile int g_AES_done;
// Must be a multiple of 16 bytes block size // Must be a multiple of 16 bytes block size
#define MAX_DMA_CHAIN_SIZE (16*6) #define MAX_DMA_CHAIN_SIZE (16*6)
static uint8_t au8OutputData[MAX_DMA_CHAIN_SIZE] MBED_ALIGN(4); MBED_ALIGN(4) static uint8_t au8OutputData[MAX_DMA_CHAIN_SIZE];
static uint8_t au8InputData[MAX_DMA_CHAIN_SIZE] MBED_ALIGN(4); MBED_ALIGN(4) static uint8_t au8InputData[MAX_DMA_CHAIN_SIZE];
static void dumpHex(const unsigned char au8Data[], int len) static void dumpHex(const unsigned char au8Data[], int len)
{ {

View File

@ -36,6 +36,8 @@ void FUN(void); \
_Pragma(_STRINGIFY(_WEAK_ALIAS_FUNC(FUN, FUN_ALIAS))) _Pragma(_STRINGIFY(_WEAK_ALIAS_FUNC(FUN, FUN_ALIAS)))
#define _WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) weak __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) #define _WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) weak __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS)
#define __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) FUN##=##FUN_ALIAS #define __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) FUN##=##FUN_ALIAS
// Suppress warning message Pe1665
#pragma diag_suppress=Pe1665
#elif defined(__GNUC__) #elif defined(__GNUC__)
#define WEAK __attribute__ ((weak)) #define WEAK __attribute__ ((weak))