diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-06-08 13:47:33 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-06-08 13:47:33 +0200 |
commit | eaeeed2e8f20775421beacfbd394ff4fe99ab685 (patch) | |
tree | ae4345f5bd9aa273a7f4f99cbc2f699a7cc23f3a /docs/examples | |
parent | 56b7663f73d44bf4774bfb934befb7071ed41280 (diff) |
fopen.c: fix a few compiler warnings
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/fopen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index 9c575d329..0aad0abf5 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -205,7 +205,7 @@ static int fill_buffer(URL_FILE *file, size_t want) } /* use to remove want bytes from the front of a files buffer */ -static int use_buffer(URL_FILE *file,int want) +static int use_buffer(URL_FILE *file, size_t want) { /* sort out buffer */ if((file->buffer_pos - want) <=0) { @@ -375,7 +375,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file) switch(file->type) { case CFTYPE_FILE: - ptr = fgets(ptr,size,file->handle.file); + ptr = fgets(ptr, (int)size, file->handle.file); break; case CFTYPE_CURL: @@ -451,7 +451,7 @@ int main(int argc, char *argv[]) URL_FILE *handle; FILE *outf; - int nread; + size_t nread; char buffer[256]; const char *url; @@ -499,7 +499,7 @@ int main(int argc, char *argv[]) } do { - nread = url_fread(buffer, 1,sizeof(buffer), handle); + nread = url_fread(buffer, 1, sizeof(buffer), handle); fwrite(buffer,1,nread,outf); } while(nread); |