tests: Add an ifdef around static IPv6 only functions
authorJakub Hrozek <jhrozek@redhat.com>
Fri, 20 Dec 2013 15:53:59 +0000 (16:53 +0100)
committerJakub Hrozek <jhrozek@redhat.com>
Fri, 20 Dec 2013 16:26:37 +0000 (17:26 +0100)
This would prevent an uninitialized function warning in case IPv6 was not
available.

tests/test_echo_tcp_write_read.c
tests/test_echo_udp_send_recv.c
tests/test_echo_udp_sendto_recvfrom.c

index e2ffe91f88600684993266c0dbdd802dc841d016..4437de9ab1e83a4a0119a47027a36def6af58ad2 100644 (file)
@@ -20,10 +20,12 @@ static void setup_echo_srv_tcp_ipv4(void **state)
        torture_setup_echo_srv_tcp_ipv4(state);
 }
 
+#ifdef HAVE_IPV6
 static void setup_echo_srv_tcp_ipv6(void **state)
 {
        torture_setup_echo_srv_tcp_ipv6(state);
 }
+#endif
 
 static void teardown(void **state)
 {
index 4ea6812651426244bba81fb3c861783f921e8501..9dd208bf88c376d73289f733cd08e22e7dd79c93 100644 (file)
@@ -20,10 +20,12 @@ static void setup_echo_srv_udp_ipv4(void **state)
        torture_setup_echo_srv_udp_ipv4(state);
 }
 
+#ifdef HAVE_IPV6
 static void setup_echo_srv_udp_ipv6(void **state)
 {
        torture_setup_echo_srv_udp_ipv6(state);
 }
+#endif
 
 static void teardown(void **state)
 {
index a7ed47476165c355458fea03f0d63981b9da5b1f..b0ed24ab11a6c7afbc3df19c96431b451a438717 100644 (file)
@@ -20,10 +20,12 @@ static void setup_echo_srv_udp_ipv4(void **state)
        torture_setup_echo_srv_udp_ipv4(state);
 }
 
+#ifdef HAVE_IPV6
 static void setup_echo_srv_udp_ipv6(void **state)
 {
        torture_setup_echo_srv_udp_ipv6(state);
 }
+#endif
 
 static void teardown(void **state)
 {