aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/ftpupload.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/ftpupload.c
parenta60edcc6d445e7e0517589cf5fda2682bd89e34e (diff)
examples: fix compiler warnings
Diffstat (limited to 'docs/examples/ftpupload.c')
-rw-r--r--docs/examples/ftpupload.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 722acbc9e..9928b9e81 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.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
@@ -32,7 +32,6 @@
#else
#include <unistd.h>
#endif
-#include "printf_macro.h"
/*
* This example shows an FTP upload, with a rename of the file just after
@@ -52,12 +51,16 @@
variable's memory when passed in to it from an app like this. */
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
+ curl_off_t nread;
/* in real-world cases, this would probably get this data differently
as this fread() stuff is exactly what the library already would do
by default internally */
size_t retcode = fread(ptr, size, nmemb, stream);
- 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;
}