From d202fbcc002665f85a6716af918454aff767c0ba Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Feb 2016 10:21:09 +0100 Subject: [PATCH] examples: fix some compiler warnings --- docs/examples/anyauthput.c | 2 +- docs/examples/sendrecv.c | 2 +- docs/examples/sepheaders.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index bc6ee5fff..2f260a132 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -100,7 +100,7 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp) /* read callback function, fread() look alike */ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) { - size_t retcode; + ssize_t retcode; curl_off_t nread; intptr_t fd = (intptr_t)stream; diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index 46daf80e7..41e283cdc 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -98,7 +98,7 @@ int main(void) return 1; } - sockfd = sockextr; + sockfd = (curl_socket_t)sockextr; /* wait for the socket to become ready for sending */ if(!wait_on_socket(sockfd, 0, 60000L)) { diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c index 6ffeb7202..a865d5796 100644 --- a/docs/examples/sepheaders.c +++ b/docs/examples/sepheaders.c @@ -31,7 +31,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) { - int written = fwrite(ptr, size, nmemb, (FILE *)stream); + size_t written = fwrite(ptr, size, nmemb, (FILE *)stream); return written; }