Skip to content

Commit 2515829

Browse files
authored
Merge pull request #139 from danielinux/macos-uninitialized-sin
test: zero-initialize sin in sendto error-path test (fix macOS build)
2 parents ad1b29c + fdecbce commit 2515829

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/unit/unit_tests_dns_dhcp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,9 @@ START_TEST(test_sock_sendto_more_error_paths)
11141114
int udp_sd;
11151115
int icmp_sd;
11161116
struct tsocket *ts;
1117-
struct wolfIP_sockaddr_in sin;
1117+
/* Zero-initialized: this error-path test passes &sin into sendto without
1118+
* filling it, which newer clang flags under -Wuninitialized-const-pointer. */
1119+
struct wolfIP_sockaddr_in sin = {0};
11181120
uint8_t buf[64];
11191121
uint8_t tiny[128];
11201122
uint8_t tiny_udp[32];

0 commit comments

Comments
 (0)