tests: Fix compiler warning that arrays might not be initialized
authorAndreas Schneider <asn@samba.org>
Thu, 21 Jul 2022 05:33:11 +0000 (07:33 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 21 Jul 2022 05:55:25 +0000 (07:55 +0200)
commit9c3113d2c30c65ac01f0a795e9e9b0df53abcce2
treeead376229ba4de2e4ea0eaf5bafa0e40345c1413
parent04430ccf0f5ce4bbb48638c53cde66c9a7bb2e3e
tests: Fix compiler warning that arrays might not be initialized

tests/test_echo_tcp_sendmsg_recvmsg_fd.c: In function 'test_tcp_sendmsg_recvmsg_fd_mixed':
tests/test_echo_tcp_sendmsg_recvmsg_fd.c:477:9: error: '<unknown>' may be used uninitialized [-Werror=maybe-uninitialized]
  477 |         test_tcp_sendmsg_recvmsg_fd_array(fd_array, num_fds);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/test_echo_tcp_sendmsg_recvmsg_fd.c:103:13: note: by argument 1 of type 'const int *' to 'test_tcp_sendmsg_recvmsg_fd_array' declared here
  103 | static void test_tcp_sendmsg_recvmsg_fd_array(const int *fds, size_t num_fds)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/test_echo_tcp_sendmsg_recvmsg_fd.c