mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
Revert commit e40175ef05: Fix a few more CLANG alignment warnings - clang warns although the target struct is packed (and may therefore be unaligned) :-(
It was caused by a local problem on my PC, I forgot that I modified cc.h... :-( Sorry for that!
This commit is contained in:
parent
500e748888
commit
a0e8c2dd8f
@ -253,7 +253,7 @@ netbiosns_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t
|
|||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
char netbios_name[NETBIOS_NAME_LEN+1];
|
char netbios_name[NETBIOS_NAME_LEN+1];
|
||||||
struct netbios_hdr* netbios_hdr = (struct netbios_hdr*)p->payload;
|
struct netbios_hdr* netbios_hdr = (struct netbios_hdr*)p->payload;
|
||||||
struct netbios_name_hdr* netbios_name_hdr = (struct netbios_name_hdr*)(void*)(netbios_hdr+1);
|
struct netbios_name_hdr* netbios_name_hdr = (struct netbios_name_hdr*)(netbios_hdr+1);
|
||||||
|
|
||||||
/* we only answer if we got a default interface */
|
/* we only answer if we got a default interface */
|
||||||
if (netif_default != NULL) {
|
if (netif_default != NULL) {
|
||||||
|
@ -747,7 +747,7 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ethhdr = (struct eth_hdr *)p->payload;
|
ethhdr = (struct eth_hdr *)p->payload;
|
||||||
hdr = (struct etharp_hdr *)(void*)((u8_t*)ethhdr + SIZEOF_ETH_HDR);
|
hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR);
|
||||||
#if ETHARP_SUPPORT_VLAN
|
#if ETHARP_SUPPORT_VLAN
|
||||||
if (ethhdr->type == PP_HTONS(ETHTYPE_VLAN)) {
|
if (ethhdr->type == PP_HTONS(ETHTYPE_VLAN)) {
|
||||||
hdr = (struct etharp_hdr *)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR);
|
hdr = (struct etharp_hdr *)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR);
|
||||||
@ -1279,10 +1279,10 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
|
|||||||
|
|
||||||
ethhdr = (struct eth_hdr *)p->payload;
|
ethhdr = (struct eth_hdr *)p->payload;
|
||||||
#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET)
|
#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET)
|
||||||
vlanhdr = (struct eth_vlan_hdr*)(void*)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR);
|
vlanhdr = (struct eth_vlan_hdr*)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR);
|
||||||
hdr = (struct etharp_hdr *)(void*)((u8_t*)ethhdr + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR);
|
hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR);
|
||||||
#else /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
|
#else /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
|
||||||
hdr = (struct etharp_hdr *)(void*)((u8_t*)ethhdr + SIZEOF_ETH_HDR);
|
hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR);
|
||||||
#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
|
#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
|
||||||
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
|
||||||
hdr->opcode = htons(opcode);
|
hdr->opcode = htons(opcode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user