net/SocketError: cast to socket_error_t to fix -Wsign-compare

Only relevant on Windows where socket_error_t is a `DWORD` (unsigned).
This commit is contained in:
Max Kellermann 2024-08-30 12:44:46 +02:00
parent 39937be2e1
commit c866199d4c
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ IsSocketError(const std::system_error &e) noexcept
static inline bool static inline bool
IsSocketError(const std::system_error &e, socket_error_t code) noexcept IsSocketError(const std::system_error &e, socket_error_t code) noexcept
{ {
return IsSocketError(e) && e.code().value() == code; return IsSocketError(e) && static_cast<socket_error_t>(e.code().value()) == code;
} }
[[gnu::pure]] [[gnu::pure]]