summaryrefslogtreecommitdiff
path: root/docs/examples/sendrecv.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/sendrecv.c
parenta60edcc6d445e7e0517589cf5fda2682bd89e34e (diff)
downloadcurl-865893fb143540037ca34f6a4438ebe2e286ec5a.tar.gz
examples: fix compiler warnings
Diffstat (limited to 'docs/examples/sendrecv.c')
-rw-r--r--docs/examples/sendrecv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index 369601d16..88fddf59f 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.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
@@ -24,7 +24,6 @@
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
-#include "printf_macro.h"
/* Auxiliary function that waits on the socket. */
static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
@@ -65,6 +64,7 @@ int main(void)
curl_socket_t sockfd; /* socket */
long sockextr;
size_t iolen;
+ curl_off_t nread;
curl = curl_easy_init();
if(curl) {
@@ -123,7 +123,9 @@ int main(void)
if(CURLE_OK != res)
break;
- printf("Received %" _FMT_SIZE_T " bytes.\n", iolen);
+ nread = (curl_off_t)iolen;
+
+ printf("Received %" CURL_FORMAT_CURL_OFF_T " bytes.\n", nread);
}
/* always cleanup */