From 90db9c0cb42def23e131cf1c4677362379e6ac22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=20Lepp=C3=A4nen?= Date: Wed, 15 Feb 2017 15:09:53 +0200 Subject: [PATCH] Corrected IAR compilation and removed compiler warnings --- .../arch/TARGET_Freescale/k64f_emac.c | 4 ++-- .../lwip-interface/lwip-sys/arch/cc.h | 20 +------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_Freescale/k64f_emac.c b/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_Freescale/k64f_emac.c index 631657eb5e..3afa22d1a6 100644 --- a/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_Freescale/k64f_emac.c +++ b/features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_Freescale/k64f_emac.c @@ -296,7 +296,7 @@ err_t k64f_etharp_output_ipv6(struct netif *netif, struct pbuf *q, const ip6_add * \param[in] action * \return ERR_OK or error code */ -err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, u8_t action) +err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, enum netif_mac_filter_action action) { switch (action) { case NETIF_ADD_MAC_FILTER: @@ -330,7 +330,7 @@ err_t igmp_mac_filter(struct netif *netif, const ip4_addr_t *group, u8_t action) * \param[in] action * \return ERR_OK or error code */ -err_t mld_mac_filter(struct netif *netif, const ip6_addr_t *group, u8_t action) +err_t mld_mac_filter(struct netif *netif, const ip6_addr_t *group, enum netif_mac_filter_action action) { switch (action) { case NETIF_ADD_MAC_FILTER: diff --git a/features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h b/features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h index 7cf88c3d0c..624fc974a8 100644 --- a/features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h +++ b/features/FEATURE_LWIP/lwip-interface/lwip-sys/arch/cc.h @@ -35,24 +35,6 @@ #include #include /* for size_t */ -/* Types based on stdint.h */ -typedef uint8_t u8_t; -typedef int8_t s8_t; -typedef uint16_t u16_t; -typedef int16_t s16_t; -typedef uint32_t u32_t; -typedef int32_t s32_t; -typedef uintptr_t mem_ptr_t; - -/* Define (sn)printf formatters for these lwIP types */ -#define U16_F "hu" -#define S16_F "hd" -#define X16_F "hx" -#define U32_F "lu" -#define S32_F "ld" -#define X32_F "lx" -#define SZT_F "uz" - /* ARM/LPC17xx is little endian only */ #if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN) #ifdef BYTE_ORDER @@ -97,7 +79,7 @@ typedef uintptr_t mem_ptr_t; #define LWIP_CHKSUM_ALGORITHM 0 void* thumb2_memcpy(void* pDest, const void* pSource, size_t length); - u16_t thumb2_checksum(const void* pData, int length); + uint16_t thumb2_checksum(const void* pData, int length); #else /* Used with IP headers only */ #define LWIP_CHKSUM_ALGORITHM 1