Add some comments to places where we cast through a void* to get rid of alignment warnings

This commit is contained in:
Dirk Ziegelmeier
2016-07-07 21:56:43 +02:00
parent 212eacd9d6
commit 087ecab891
3 changed files with 5 additions and 0 deletions

View File

@@ -364,6 +364,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
return EAI_MEMORY;
}
memset(ai, 0, total_size);
/* cast through void* to get rid of alignment warnings */
sa = (struct sockaddr_storage *)(void*)((u8_t*)ai + sizeof(struct addrinfo));
if (IP_IS_V6_VAL(addr)) {
#if LWIP_IPV6