Skip to content

lib: fix conversion warnings#4483

Closed
MarcelRaad wants to merge 2 commits intocurl:masterfrom
MarcelRaad:mingw_signcompare
Closed

lib: fix conversion warnings#4483
MarcelRaad wants to merge 2 commits intocurl:masterfrom
MarcelRaad:mingw_signcompare

Conversation

@MarcelRaad
Copy link
Member

These occur with MinGW-w64 using WinSock.

With MinGW-w64 using WinSock, `curl_socklen_t` is signed, while the
result of `sizeof` is unsigned.

Closes
With MinGW-w64, `curl_socket_t` is is a 32 or 64 bit unsigned integer,
while `read` expects a 32 bit signed integer.
Use `sread` instead of `read` to use the correct parameter type.

Closes
@jay jay added build Windows Windows-specific labels Oct 13, 2019
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Oct 13, 2019
With MinGW-w64, `curl_socket_t` is is a 32 or 64 bit unsigned integer,
while `read` expects a 32 bit signed integer.
Use `sread` instead of `read` to use the correct parameter type.

Closes curl#4483
@MarcelRaad MarcelRaad deleted the mingw_signcompare branch October 13, 2019 20:11
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

build Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

2 participants