diff options
author | Marcel Raad <raad@teamviewer.com> | 2017-04-30 23:29:31 +0200 |
---|---|---|
committer | Marcel Raad <raad@teamviewer.com> | 2017-04-30 23:29:31 +0200 |
commit | c23177d5e90aec2ec42bd20004d0acf0a6412456 (patch) | |
tree | e0bc8e1f451614b06396c44ccf0dad1b3a57dc49 /docs/examples | |
parent | dc9e4859bb50e4d438dbbb016870effea395b624 (diff) |
examples: declare TU-local variables static
This fixes missing-variable-declarations warnings when building with
clang.
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/fopen.c | 2 | ||||
-rw-r--r-- | docs/examples/ftpuploadfrommem.c | 2 | ||||
-rw-r--r-- | docs/examples/http2-download.c | 4 | ||||
-rw-r--r-- | docs/examples/http2-upload.c | 6 | ||||
-rw-r--r-- | docs/examples/post-callback.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c index 95dd4ce9a..1e0a09a0a 100644 --- a/docs/examples/fopen.c +++ b/docs/examples/fopen.c @@ -88,7 +88,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file); void url_rewind(URL_FILE *file); /* we use a global one for convenience */ -CURLM *multi_handle; +static CURLM *multi_handle; /* curl calls this routine to get more data */ static size_t write_callback(char *buffer, diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 577d15c1d..dec7bbbbe 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -27,7 +27,7 @@ #include <string.h> #include <curl/curl.h> -const char data[]= +static const char data[]= "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " "Nam rhoncus odio id venenatis volutpat. Vestibulum dapibus " "bibendum ullamcorper. Maecenas finibus elit augue, vel " diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c index 0cf83f524..8c0b0876e 100644 --- a/docs/examples/http2-download.c +++ b/docs/examples/http2-download.c @@ -43,8 +43,8 @@ #define NUM_HANDLES 1000 -void *curl_hnd[NUM_HANDLES]; -int num_transfers; +static void *curl_hnd[NUM_HANDLES]; +static int num_transfers; /* a handle to number lookup, highly ineffective when we do many transfers... */ diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index aa0ac4458..01dfc0b3d 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -45,8 +45,8 @@ #define NUM_HANDLES 1000 -void *curl_hnd[NUM_HANDLES]; -int num_transfers; +static void *curl_hnd[NUM_HANDLES]; +static int num_transfers; /* a handle to number lookup, highly ineffective when we do many transfers... */ @@ -177,7 +177,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) return retcode; } -struct input indata[NUM_HANDLES]; +static struct input indata[NUM_HANDLES]; static void setup(CURL *hnd, int num, const char *upload) { diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c index f4cd50c0b..dbf249140 100644 --- a/docs/examples/post-callback.c +++ b/docs/examples/post-callback.c @@ -28,7 +28,7 @@ #include <string.h> #include <curl/curl.h> -const char data[]="this is what we post to the silly web server"; +static const char data[]="this is what we post to the silly web server"; struct WriteThis { const char *readptr; |