mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:53:43 +03:00
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:
parent
2dbe75bd7f
commit
95a882d268
10 changed files with 32 additions and 24 deletions
|
|
@ -69,17 +69,15 @@ static int my_seek(void *userp, curl_off_t offset, int origin)
|
|||
/* read callback function, fread() look alike */
|
||||
static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
ssize_t retcode;
|
||||
unsigned long nread;
|
||||
size_t nread;
|
||||
|
||||
retcode = fread(ptr, size, nmemb, stream);
|
||||
nread = fread(ptr, size, nmemb, stream);
|
||||
|
||||
if(retcode > 0) {
|
||||
nread = (unsigned long)retcode;
|
||||
fprintf(stderr, "*** We read %lu bytes from file\n", nread);
|
||||
if(nread > 0) {
|
||||
fprintf(stderr, "*** We read %lu bytes from file\n", (unsigned long)nread);
|
||||
}
|
||||
|
||||
return retcode;
|
||||
return nread;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue