test: fix -Wuninitialized-const-pointer warning (#4990)

Zero the struct. The compiler is not aware it's not actually used.
This commit is contained in:
Ben Noordhuis 2026-01-07 23:24:28 +01:00 committed by GitHub
parent 91ae02a63d
commit f420c2bd57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,7 @@
#include "uv.h"
#include "task.h"
#include <string.h>
#ifdef _WIN32
# define putenv _putenv
@ -218,6 +219,7 @@ TEST_IMPL(threadpool_cancel_getaddrinfo) {
r = uv_getaddrinfo(loop, reqs + 2, getaddrinfo_cb, "fail", "fail", NULL);
ASSERT_OK(r);
memset(&hints, 0, sizeof(hints));
r = uv_getaddrinfo(loop, reqs + 3, getaddrinfo_cb, "fail", NULL, &hints);
ASSERT_OK(r);