mirror of
https://github.com/curl/curl.git
synced 2026-08-09 03:44:18 +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
|
|
@ -44,7 +44,7 @@ int main(void)
|
|||
long my_scope_id;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
my_scope_id = if_nametoindex("eth0");
|
||||
my_scope_id = (long)if_nametoindex("eth0");
|
||||
curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
|
||||
|
||||
/* Perform the request, res gets the return code */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue