aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/anyauthput.c2
-rw-r--r--docs/examples/cookie_interface.c3
-rw-r--r--docs/examples/ftpget.c2
-rw-r--r--docs/examples/ftpgetresp.c2
-rw-r--r--docs/examples/ftpupload.c1
-rw-r--r--docs/examples/getinmemory.c4
-rw-r--r--docs/examples/httpput.c3
-rw-r--r--docs/examples/post-callback.c2
-rw-r--r--docs/examples/sepheaders.c2
9 files changed, 12 insertions, 9 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 54cea0017..bc6138f58 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -57,7 +57,7 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
}
/* read callback function, fread() look alike */
-size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index a39106e34..b0f33831d 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include <errno.h>
#include <time.h>
@@ -74,7 +75,7 @@ main(void)
#define snprintf _snprintf
#endif
/* Netscape format cookie */
- snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%u\t%s\t%s",
+ snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if (res != CURLE_OK) {
diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c
index 4e3fc8fc3..42e70bd57 100644
--- a/docs/examples/ftpget.c
+++ b/docs/examples/ftpget.c
@@ -26,7 +26,7 @@ struct FtpFile {
FILE *stream;
};
-int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
+static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
{
struct FtpFile *out=(struct FtpFile *)stream;
if(out && !out->stream) {
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index cf61ded02..31c1f424f 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -21,7 +21,7 @@
* This functionality was introduced in libcurl 7.9.3.
*/
-size_t
+static size_t
write_response(void *ptr, size_t size, size_t nmemb, void *data)
{
FILE *writehere = (FILE *)data;
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 65f8a8a79..5a098495d 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -14,6 +14,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <unistd.h>
/*
* This example shows an FTP upload, with a rename of the file just after
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index 00ed39eb2..e80aa4165 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -26,7 +26,7 @@ struct MemoryStruct {
size_t size;
};
-void *myrealloc(void *ptr, size_t size)
+static void *myrealloc(void *ptr, size_t size)
{
/* There might be a realloc() out there that doesn't like reallocing
NULL pointers, so we take care of it here */
@@ -36,7 +36,7 @@ void *myrealloc(void *ptr, size_t size)
return malloc(size);
}
-size_t
+static size_t
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t realsize = size * nmemb;
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 8fd423c7d..5b92548a5 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <curl/curl.h>
@@ -24,7 +25,7 @@
* http://www.apacheweek.com/features/put
*/
-size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index a2c89873f..531b68156 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -22,7 +22,7 @@ struct WriteThis {
int sizeleft;
};
-size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{
struct WriteThis *pooh = (struct WriteThis *)userp;
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index e35aebfb1..adfa4374a 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -16,7 +16,7 @@
#include <curl/types.h>
#include <curl/easy.h>
-size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
{
int written = fwrite(ptr, size, nmemb, (FILE *)stream);
return written;