From c866199d4c5cacd56734306d2b2be69ed4f3df03 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 30 Aug 2024 12:44:46 +0200 Subject: [PATCH] net/SocketError: cast to socket_error_t to fix -Wsign-compare Only relevant on Windows where socket_error_t is a `DWORD` (unsigned). --- src/net/SocketError.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/SocketError.hxx b/src/net/SocketError.hxx index de81073e8..d20ae12b2 100644 --- a/src/net/SocketError.hxx +++ b/src/net/SocketError.hxx @@ -176,7 +176,7 @@ IsSocketError(const std::system_error &e) noexcept static inline bool IsSocketError(const std::system_error &e, socket_error_t code) noexcept { - return IsSocketError(e) && e.code().value() == code; + return IsSocketError(e) && static_cast(e.code().value()) == code; } [[gnu::pure]]