From cb172ae750bec33f54d90936999e660341f69f5c Mon Sep 17 00:00:00 2001
From: Brad Hards <bradh@frogmouth.net>
Date: Sat, 18 Dec 2010 10:26:02 +1100
Subject: [PATCH 2/3] Examples: Use 'z' printf modifier to avoid warnings with size_t arguments.

---
 docs/examples/anyauthput.c |    2 +-
 docs/examples/ftpupload.c  |    2 +-
 docs/examples/httpput.c    |    2 +-
 docs/examples/sendrecv.c   |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index cec9fed..bca953a 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -82,7 +82,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
 
   retcode = read(fd, ptr, size * nmemb);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  fprintf(stderr, "*** We read %zd bytes from file\n", retcode);
 
   return retcode;
 }
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index f1f66c0..5985203 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -44,7 +44,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
      by default internally */
   size_t retcode = fread(ptr, size, nmemb, stream);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  fprintf(stderr, "*** We read %zd bytes from file\n", retcode);
   return retcode;
 }
 
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 821e95f..f29b7ae 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.c
@@ -33,7 +33,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
      by default internally */
   retcode = fread(ptr, size, nmemb, stream);
 
-  fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+  fprintf(stderr, "*** We read %zd bytes from file\n", retcode);
 
   return retcode;
 }
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index ad5ddd1..0919e4c 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -49,7 +49,7 @@ int main(void)
   CURLcode res;
   /* Minimalistic http request */
   const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
-  int sockfd; /* socket */
+  long sockfd; /* socket */
   size_t iolen;
 
   curl = curl_easy_init();
@@ -105,7 +105,7 @@ int main(void)
       if(CURLE_OK != res)
         break;
 
-      printf("Received %u bytes.\n", iolen);
+      printf("Received %zu bytes.\n", iolen);
     }
 
     /* always cleanup */
-- 
1.7.1


