From 865893fb143540037ca34f6a4438ebe2e286ec5a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 13 Apr 2012 17:58:41 +0200 Subject: examples: fix compiler warnings --- docs/examples/ftpupload.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/examples/ftpupload.c') 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, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , 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 #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; } -- cgit v1.2.3