aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/anyauthput.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-13 17:58:41 +0200
committerYang Tse <yangsita@gmail.com>2012-04-13 17:59:49 +0200
commit865893fb143540037ca34f6a4438ebe2e286ec5a (patch)
tree7e915522d0c9e6eafd0a4d30929dfa45c3695da3 /docs/examples/anyauthput.c
parenta60edcc6d445e7e0517589cf5fda2682bd89e34e (diff)
examples: fix compiler warnings
Diffstat (limited to 'docs/examples/anyauthput.c')
-rw-r--r--docs/examples/anyauthput.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 2997a1e98..a28ecb769 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -42,7 +42,6 @@
#endif
#include <curl/curl.h>
-#include "printf_macro.h"
#if LIBCURL_VERSION_NUM < 0x070c03
#error "upgrade your libcurl to no less than 7.12.3"
@@ -89,12 +88,16 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ curl_off_t nread;
intptr_t fd = (intptr_t)stream;
retcode = read(fd, ptr, size * nmemb);
- fprintf(stderr, "*** We read %" _FMT_SIZE_T " bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}