mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
Fix compile of UDP unit test
Fix building unit tests via contrib/ports/unix/check on Debian 9, gcc 6.3.0.
Fixes:
<snip>/ip_addr.h:105:58: error: the comparison will always evaluate as ‘true’ for the address of ‘ip1’ will never be NULL [-Werror=address]
#define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr),iptype); }}while(0)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
(cherry picked from commit 2f098c42a7
)
This commit is contained in:
parent
bebf072b77
commit
aad77fcacb
@ -346,8 +346,8 @@ START_TEST(test_udp_bind)
|
||||
LWIP_UNUSED_ARG(_i);
|
||||
|
||||
/* bind on same port using different IP address types */
|
||||
ip_addr_set_any(0, &ip1);
|
||||
ip_addr_set_any(1, &ip2);
|
||||
ip_addr_set_any_val(0, ip1);
|
||||
ip_addr_set_any_val(1, ip2);
|
||||
|
||||
pcb1 = udp_new_ip_type(IPADDR_TYPE_V4);
|
||||
pcb2 = udp_new_ip_type(IPADDR_TYPE_V6);
|
||||
@ -362,8 +362,8 @@ START_TEST(test_udp_bind)
|
||||
udp_remove(pcb2);
|
||||
|
||||
/* bind on same port using SAME IPv4 address type */
|
||||
ip_addr_set_any(0, &ip1);
|
||||
ip_addr_set_any(0, &ip2);
|
||||
ip_addr_set_any_val(0, ip1);
|
||||
ip_addr_set_any_val(0, ip2);
|
||||
|
||||
pcb1 = udp_new_ip_type(IPADDR_TYPE_V4);
|
||||
pcb2 = udp_new_ip_type(IPADDR_TYPE_V4);
|
||||
@ -378,8 +378,8 @@ START_TEST(test_udp_bind)
|
||||
udp_remove(pcb2);
|
||||
|
||||
/* bind on same port using SAME IPv4 address type */
|
||||
ip_addr_set_any(1, &ip1);
|
||||
ip_addr_set_any(1, &ip2);
|
||||
ip_addr_set_any_val(1, ip1);
|
||||
ip_addr_set_any_val(1, ip2);
|
||||
|
||||
pcb1 = udp_new_ip_type(IPADDR_TYPE_V6);
|
||||
pcb2 = udp_new_ip_type(IPADDR_TYPE_V6);
|
||||
@ -394,8 +394,8 @@ START_TEST(test_udp_bind)
|
||||
udp_remove(pcb2);
|
||||
|
||||
/* Bind with different IP address type */
|
||||
ip_addr_set_any(0, &ip1);
|
||||
ip_addr_set_any(1, &ip2);
|
||||
ip_addr_set_any_val(0, ip1);
|
||||
ip_addr_set_any_val(1, ip2);
|
||||
|
||||
pcb1 = udp_new_ip_type(IPADDR_TYPE_V6);
|
||||
pcb2 = udp_new_ip_type(IPADDR_TYPE_V4);
|
||||
|
Loading…
Reference in New Issue
Block a user