summaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-05-31 19:05:50 +0200
committerMarcel Raad <raad@teamviewer.com>2017-05-31 19:05:50 +0200
commit45cecfbd33b121c864cbb7b83ea63f749e99f424 (patch)
tree12330a7e5d7e97c1fd38414650c1155e878b19b8 /tests/libtest
parentaae4a4788a4949d85069c5959c860969dc614be7 (diff)
downloadgnurl-45cecfbd33b121c864cbb7b83ea63f749e99f424.tar.gz
gnurl-45cecfbd33b121c864cbb7b83ea63f749e99f424.tar.bz2
gnurl-45cecfbd33b121c864cbb7b83ea63f749e99f424.zip
lib583: fix compiler warning
Use CURLMcode for variable 'res' and cast to int where necessary instead of the other way around. Other tests do the same. This fixes the following clang warning: lib583.c:68:15: warning: cast from function call of type 'CURLMcode' to non-matching type 'int' [-Wbad-function-cast]
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib583.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c
index 5b11fab2b..f0a088b70 100644
--- a/tests/libtest/lib583.c
+++ b/tests/libtest/lib583.c
@@ -35,7 +35,7 @@ int test(char *URL)
int stillRunning;
CURLM *multiHandle = NULL;
CURL *curl = NULL;
- int res = 0;
+ CURLMcode res = CURLM_OK;
global_init(CURL_GLOBAL_ALL);
@@ -65,10 +65,10 @@ int test(char *URL)
fprintf(stderr, "curl_multi_perform() succeeded\n");
fprintf(stderr, "curl_multi_remove_handle()...\n");
- res = (int) curl_multi_remove_handle(multiHandle, curl);
+ res = curl_multi_remove_handle(multiHandle, curl);
if(res)
fprintf(stderr, "curl_multi_remove_handle() failed, "
- "with code %d\n", res);
+ "with code %d\n", (int)res);
else
fprintf(stderr, "curl_multi_remove_handle() succeeded\n");
@@ -80,5 +80,5 @@ test_cleanup:
curl_multi_cleanup(multiHandle);
curl_global_cleanup();
- return res;
+ return (int)res;
}