summaryrefslogtreecommitdiff
path: root/docs/examples/httpput.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/httpput.c
parenta60edcc6d445e7e0517589cf5fda2682bd89e34e (diff)
downloadgnurl-865893fb143540037ca34f6a4438ebe2e286ec5a.tar.gz
gnurl-865893fb143540037ca34f6a4438ebe2e286ec5a.tar.bz2
gnurl-865893fb143540037ca34f6a4438ebe2e286ec5a.zip
examples: fix compiler warnings
Diffstat (limited to 'docs/examples/httpput.c')
-rw-r--r--docs/examples/httpput.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 664c8e152..f04618f96 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.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
@@ -25,7 +25,6 @@
#include <unistd.h>
#include <curl/curl.h>
-#include "printf_macro.h"
/*
* This example shows a HTTP PUT operation. PUTs a file given as a command
@@ -40,13 +39,17 @@
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ 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 */
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;
}