Skip to content

Commit afb5aba

Browse files
committed
[M487] Fix compile warnings with IAR toolchain
1 parent 99d12b1 commit afb5aba

File tree

3 files changed

+8
-6
lines changed
  • features
    • FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_NUVOTON/TARGET_M480
    • mbedtls/targets/TARGET_NUVOTON/TARGET_M480/aes
  • targets/TARGET_NUVOTON/TARGET_M480/device

3 files changed

+8
-6
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_NUVOTON/TARGET_M480/m480_eth.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] __attribute__ ((aligned(4)));
4444
struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] __attribute__ ((aligned(4)));
4545
#endif
4646
*/
47-
struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM] MBED_ALIGN(4);
48-
struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM] MBED_ALIGN(4);
47+
MBED_ALIGN(4) struct eth_descriptor rx_desc[RX_DESCRIPTOR_NUM];
48+
MBED_ALIGN(4) struct eth_descriptor tx_desc[TX_DESCRIPTOR_NUM];
4949

5050
struct eth_descriptor volatile *cur_tx_desc_ptr, *cur_rx_desc_ptr, *fin_tx_desc_ptr;
5151

52-
u8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] MBED_ALIGN(4);
53-
u8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE] MBED_ALIGN(4);
52+
MBED_ALIGN(4) u8_t rx_buf[RX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE];
53+
MBED_ALIGN(4) u8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE];
5454

5555
extern void ethernetif_input(u16_t len, u8_t *buf, u32_t s, u32_t ns);
5656
extern void ethernetif_loopback_input(struct pbuf *p);

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/aes/aes_alt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ extern volatile int g_AES_done;
5656

5757
// Must be a multiple of 16 bytes block size
5858
#define MAX_DMA_CHAIN_SIZE (16*6)
59-
static uint8_t au8OutputData[MAX_DMA_CHAIN_SIZE] MBED_ALIGN(4);
60-
static uint8_t au8InputData[MAX_DMA_CHAIN_SIZE] MBED_ALIGN(4);
59+
MBED_ALIGN(4) static uint8_t au8OutputData[MAX_DMA_CHAIN_SIZE];
60+
MBED_ALIGN(4) static uint8_t au8InputData[MAX_DMA_CHAIN_SIZE];
6161

6262
static void dumpHex(const unsigned char au8Data[], int len)
6363
{

targets/TARGET_NUVOTON/TARGET_M480/device/startup_M480.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ void FUN(void); \
3636
_Pragma(_STRINGIFY(_WEAK_ALIAS_FUNC(FUN, FUN_ALIAS)))
3737
#define _WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) weak __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS)
3838
#define __WEAK_ALIAS_FUNC(FUN, FUN_ALIAS) FUN##=##FUN_ALIAS
39+
// Suppress warning message Pe1665
40+
#pragma diag_suppress=Pe1665
3941

4042
#elif defined(__GNUC__)
4143
#define WEAK __attribute__ ((weak))

0 commit comments

Comments
 (0)