Continue to fix incorrect casts via size_t for some platforms

Now also for casts:
- to remove alignment warnings
- casts between pointers and ints
This commit is contained in:
Dirk Ziegelmeier
2016-12-12 10:17:33 +01:00
parent f2a5aa2866
commit e5f9f187ad
4 changed files with 16 additions and 4 deletions

View File

@@ -840,7 +840,7 @@ etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr)
if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
!ip4_addr_islinklocal(ipaddr)) {
#if LWIP_AUTOIP
struct ip_hdr *iphdr = (struct ip_hdr*)(size_t)q->payload;
struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr*, q->payload);
/* According to RFC 3297, chapter 2.6.2 (Forwarding Rules), a packet with
a link-local source address must always be "directly to its destination
on the same physical link. The host MUST NOT send the packet to any