From c3a8fbaeff874b3c6a9cf9b06801fa586f856b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 17 Jan 2025 13:32:51 +0100 Subject: [PATCH] test: use correct type for uv_fileno arguments Fixes a -Wincompatible-pointer-types error on Windows, since uv_os_fd_t is not int but HANDLE. --- test/test-poll-oob.c | 2 +- test/test-tcp-rst.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-poll-oob.c b/test/test-poll-oob.c index b40c93c3..39bb60ed 100644 --- a/test/test-poll-oob.c +++ b/test/test-poll-oob.c @@ -68,7 +68,7 @@ static void idle_cb(uv_idle_t* idle) { static void poll_cb(uv_poll_t* handle, int status, int events) { char buffer[5]; int n; - int fd; + uv_os_fd_t fd; ASSERT_OK(uv_fileno((uv_handle_t*)handle, &fd)); memset(buffer, 0, 5); diff --git a/test/test-tcp-rst.c b/test/test-tcp-rst.c index 7729f03e..257b25c3 100644 --- a/test/test-tcp-rst.c +++ b/test/test-tcp-rst.c @@ -47,9 +47,9 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { ASSERT_PTR_EQ((uv_tcp_t*) t, &tcp); ASSERT_EQ(nread, UV_ECONNRESET); - int fd; + uv_os_fd_t fd; ASSERT_OK(uv_fileno((uv_handle_t*) t, &fd)); - uv_handle_type type = uv_guess_handle(fd); + uv_handle_type type = uv_guess_handle((uv_file) fd); ASSERT_EQ(type, UV_TCP); uv_close((uv_handle_t *) t, close_cb);