aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/ftpgetinfo.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-12-17 23:34:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-12-17 23:34:26 +0100
commit9583b4af9057c9e35ec3dd3270d4c4813b5f7aaa (patch)
treee50544f244a6243aec3d72a559375c17b83f25bb /docs/examples/ftpgetinfo.c
parent8219bc9e19c78ec4617ae5311b4ea64c49763ff6 (diff)
examples: fix compiler warnings
Diffstat (limited to 'docs/examples/ftpgetinfo.c')
-rw-r--r--docs/examples/ftpgetinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c
index c4e234f18..95c6f8ac8 100644
--- a/docs/examples/ftpgetinfo.c
+++ b/docs/examples/ftpgetinfo.c
@@ -21,6 +21,8 @@
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
{
+ (void)ptr;
+ (void)data;
/* we are not interested in the headers itself,
so we only return the size we would have saved ... */
return (size_t)(size * nmemb);
@@ -58,7 +60,7 @@ int main(void)
if((CURLE_OK == res) && filetime)
printf("filetime %s: %s", filename, ctime(&filetime));
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
- if((CURLE_OK == res) && filesize)
+ if((CURLE_OK == res) && (filesize>0))
printf("filesize %s: %0.0f bytes\n", filename, filesize);
} else {
/* we failed */