mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-16 08:43:17 +00:00
Fix sockets on MSVC after IPv6 zone work
This fixes the following build failure with MSVC 2013: sockets.c(323): warning C4242: '=' : conversion from 'const u32_t' to 'u8_t', possible loss of data This casts sin6_scope_id to a u8_t before calling ip6_addr_set_zone()
This commit is contained in:
parent
8a34570b83
commit
a0a64a59ba
@ -100,7 +100,7 @@
|
|||||||
#define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \
|
#define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \
|
||||||
inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \
|
inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \
|
||||||
if (ip6_addr_has_scope(ip_2_ip6(ipaddr), IP6_UNKNOWN)) { \
|
if (ip6_addr_has_scope(ip_2_ip6(ipaddr), IP6_UNKNOWN)) { \
|
||||||
ip6_addr_set_zone(ip_2_ip6(ipaddr), (sin6)->sin6_scope_id); \
|
ip6_addr_set_zone(ip_2_ip6(ipaddr), (u8_t)(sin6)->sin6_scope_id); \
|
||||||
} \
|
} \
|
||||||
(port) = lwip_ntohs((sin6)->sin6_port); }while(0)
|
(port) = lwip_ntohs((sin6)->sin6_port); }while(0)
|
||||||
#endif /* LWIP_IPV6 */
|
#endif /* LWIP_IPV6 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user