From 54f09679ab0af396041c81b28be35ef48ae381f2 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Fri, 13 May 2011 17:28:46 +0000 Subject: [PATCH] The Keil compiler insists on having the IP address structure packed, but doing so causes problems with warnings being generated on other compilers. uip.h was therefore updated to just use the pack attribute when the Keil compiler is used. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1422 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/Common/ethernet/FreeTCPIP/net/uip.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Demo/Common/ethernet/FreeTCPIP/net/uip.h b/Demo/Common/ethernet/FreeTCPIP/net/uip.h index 3cfad7bef..3a0ed1989 100644 --- a/Demo/Common/ethernet/FreeTCPIP/net/uip.h +++ b/Demo/Common/ethernet/FreeTCPIP/net/uip.h @@ -69,14 +69,16 @@ typedef uip_ip6addr_t uip_ipaddr_t; #else /* UIP_CONF_IPV6 */ - #include "pack_struct_start.h" - typedef union uip_ip4addr_t - { - u8_t u8[4]; /* Initializer, must come first!!! */ - u16_t u16[2]; - } uip_ip4addr_t; - typedef uip_ip4addr_t uip_ipaddr_t - #include "pack_struct_end.h" + #ifdef __CC_ARM + __packed /* The ARM compiler insists on this being packed, but with other compilers packing it generates a warning as it will be packed anyway. */ + #endif + + typedef union uip_ip4addr_t + { + u8_t u8[4]; /* Initializer, must come first!!! */ + u16_t u16[2]; + } uip_ip4addr_t; + typedef uip_ip4addr_t uip_ipaddr_t; #endif /* UIP_CONF_IPV6 */ /*---------------------------------------------------------------------------*/ -- 2.39.5