1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

libtest: fix MinGW-w64 warnings

long is 32 bits while size_t is 64 bits on MinGW-w64, so
typecheck-gcc.h complains when using size_t for a long option.
Also, curl_socket_t is unsigned long long rather than int.
This commit is contained in:
Marcel Raad 2017-05-08 19:59:46 +02:00
parent 7800730520
commit 141ed8ca09
No known key found for this signature in database
GPG Key ID: B4668817AE6D6CD4
6 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
res = curl_easy_perform(curl);

View File

@ -85,7 +85,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
res = curl_easy_perform(curl);

View File

@ -83,7 +83,7 @@ int test(char *URL)
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L);
test_setopt(curl, CURLOPT_INFILESIZE, strlen(data));
test_setopt(curl, CURLOPT_INFILESIZE, (long)strlen(data));
test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED);
res = curl_easy_perform(curl);

View File

@ -98,7 +98,7 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_READDATA, &counter);
/* We CANNOT do the POST fine without setting the size (or choose
chunked)! */
easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(UPLOADTHIS));
easy_setopt(curl, CURLOPT_POST, 1L);
#ifdef CURL_DOES_CONVERSIONS

View File

@ -77,7 +77,7 @@ int test(char *URL)
#endif
/* Set the expected POST size */
test_setopt(curl, CURLOPT_POSTFIELDSIZE, data_size);
test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)data_size);
test_setopt(curl, CURLOPT_POSTFIELDS, data);
/* we want to use our own progress function */

View File

@ -320,7 +320,7 @@ int test(char *URL)
tv.tv_usec = 100000;
}
select_test(maxFd, &readSet, &writeSet, NULL, &tv);
select_test((int)maxFd, &readSet, &writeSet, NULL, &tv);
/* Check the sockets for reading / writing */
checkFdSet(m, &sockets.read, &readSet, CURL_CSELECT_IN, "read");