mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
examples: fix/silence -Wsign-conversion
- extend `FD_SET()` hack to all platforms (was only Cygwin).
Warnings may also happen in other envs, e.g. OmniOS.
Ref: https://github.com/libssh2/libssh2/actions/runs/8854199687/job/24316762831#step:3:2021
- tidy-up `CURLcode` vs `int` use.
- cast an unsigned to `long` before passing to `curl_easy_setopt()`.
Cherry-picked from #13489
Follow-up to 3829759bd0 #12489
Closes #13501
This commit is contained in:
parent
7ca0a3791b
commit
5b9955e0bd
4 changed files with 8 additions and 11 deletions
|
|
@ -68,16 +68,13 @@ static int recv_pong(CURL *curl, const char *expected_payload)
|
|||
return (int)result;
|
||||
}
|
||||
|
||||
static int recv_any(CURL *curl)
|
||||
static CURLcode recv_any(CURL *curl)
|
||||
{
|
||||
size_t rlen;
|
||||
const struct curl_ws_frame *meta;
|
||||
char buffer[256];
|
||||
CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
return 0;
|
||||
return curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
|
||||
}
|
||||
|
||||
/* close the connection */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue