build: fix -Wconversion/-Wsign-conversion warnings

Fix remaining warnings in examples and tests which are not suppressed
by the pragma in `lib/curl_setup.h`.

Silence a toolchain issue causing warnings in `FD_SET()` calls with
older Cygwin/MSYS2 builds. Likely fixed on 2020-08-03 by:
https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=5717262b8ecfed0f7fab63e2c09c78991e36f9dd

Follow-up to 2dbe75bd7f #12492

Closes #12557
This commit is contained in:
Viktor Szakats 2023-12-19 19:16:03 +00:00
parent 2dbe75bd7f
commit 95a882d268
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
10 changed files with 32 additions and 24 deletions

View file

@ -44,7 +44,7 @@ static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
/* open file for writing */
out->stream = fopen(out->filename, "wb");
if(!out->stream)
return -1; /* failure, cannot open file to write */
return 0; /* failure, cannot open file to write */
}
return fwrite(buffer, size, nmemb, out->stream);
}