From c7cb8194488991a1164c5573ab8c077369867764 Mon Sep 17 00:00:00 2001 From: Sergey Markelov Date: Tue, 5 Sep 2023 14:07:02 -0700 Subject: [PATCH] Fix LLVM clang compile warnings on Windows --- fetch_posix.c | 2 +- wpad_dhcp_posix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch_posix.c b/fetch_posix.c index f7a984e..e1d9cb2 100644 --- a/fetch_posix.c +++ b/fetch_posix.c @@ -78,7 +78,7 @@ char *fetch_get(const char *url, int32_t *error) { // Create communication socket sfd = socket(address_info->ai_family, address_info->ai_socktype, address_info->ai_protocol); - if (sfd == -1) { + if ((int)sfd == -1) { err = socketerr; LOG_ERROR("Unable to create socket (%" PRId32 ")\n", err); goto download_cleanup; diff --git a/wpad_dhcp_posix.c b/wpad_dhcp_posix.c index 82431d0..db56526 100644 --- a/wpad_dhcp_posix.c +++ b/wpad_dhcp_posix.c @@ -202,7 +202,7 @@ static bool dhcp_read_reply(SOCKET sfd, uint32_t request_xid, dhcp_msg *reply) { char *wpad_dhcp_adapter_posix(uint8_t bind_ip[4], net_adapter_s *adapter, int32_t timeout_sec) { SOCKET sfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (sfd == -1) { + if ((int)sfd == -1) { LOG_ERROR("Unable to create udp socket\n"); return NULL; }