diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-01 10:13:44 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-08-01 10:13:44 +0000 |
commit | df3cee1a3a2bfd5747acbf7a056cf89bba8df825 (patch) | |
tree | 805352bb27262ed7405aad86b692203cfe6c9c49 /block/curl.c | |
parent | 2353422294a01936ddf691440b4a926022379aff (diff) | |
download | qemu-df3cee1a3a2bfd5747acbf7a056cf89bba8df825.zip qemu-df3cee1a3a2bfd5747acbf7a056cf89bba8df825.tar.gz qemu-df3cee1a3a2bfd5747acbf7a056cf89bba8df825.tar.bz2 |
Fix Sparse warning about "expression using sizeof on a function"
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'block/curl.c')
-rw-r--r-- | block/curl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/curl.c b/block/curl.c index 9e21d4a..3caa9be 100644 --- a/block/curl.c +++ b/block/curl.c @@ -269,7 +269,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) return NULL; curl_easy_setopt(state->curl, CURLOPT_URL, s->url); curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 5); - curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, curl_read_cb); + curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb); curl_easy_setopt(state->curl, CURLOPT_WRITEDATA, (void *)state); curl_easy_setopt(state->curl, CURLOPT_PRIVATE, (void *)state); curl_easy_setopt(state->curl, CURLOPT_AUTOREFERER, 1); @@ -358,11 +358,11 @@ static int curl_open(BlockDriverState *bs, const char *filename, int flags) // Get file size curl_easy_setopt(state->curl, CURLOPT_NOBODY, 1); - curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, curl_size_cb); + curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_size_cb); if (curl_easy_perform(state->curl)) goto out; curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d); - curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, curl_read_cb); + curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb); curl_easy_setopt(state->curl, CURLOPT_NOBODY, 0); if (d) s->len = (size_t)d; |