[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 45/254: examples: declare TU-local variables static
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 45/254: examples: declare TU-local variables static |
Date: |
Sat, 17 Jun 2017 16:51:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit c23177d5e90aec2ec42bd20004d0acf0a6412456
Author: Marcel Raad <address@hidden>
AuthorDate: Sun Apr 30 23:29:31 2017 +0200
examples: declare TU-local variables static
This fixes missing-variable-declarations warnings when building with
clang.
---
docs/examples/fopen.c | 2 +-
docs/examples/ftpuploadfrommem.c | 2 +-
docs/examples/http2-download.c | 4 ++--
docs/examples/http2-upload.c | 6 +++---
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;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 132/254: FAQ: add 7.4 to toc, (continued)
- [GNUnet-SVN] [gnurl] 132/254: FAQ: add 7.4 to toc, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 126/254: multi: use a fixed array of timers instead of malloc, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 48/254: tests: declare TU-local variables static, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 119/254: tests: list the primary server first in the server section, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 134/254: THANKS: add a few missing names, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 109/254: runtests: fix "use of undefined value" warning in -R handling, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 31/254: Makefile: fix make dist, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 59/254: http2: use the correct set buffer size, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 95/254: tests/server: run checksrc by default in debug-builds, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 85/254: test559: verify use of minimum CURLOPT_BUFFERSIZE, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 45/254: examples: declare TU-local variables static,
gnunet <=
- [GNUnet-SVN] [gnurl] 125/254: multi: assign IDs to all timers and make each timer singleton, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 155/254: cmake: Add CURL_CA_FALLBACK to curl_config.h.cmake, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 77/254: RELEASE-NOTES: synced with 862b02f89, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 189/254: examples/sampleconv.c: indent changes, made callbacks static, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 82/254: CURLINFO_EFFECTIVE_URL.3: add example, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 56/254: file: use private buffer for C-L output, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 166/254: redirect: store the "would redirect to" URL when max redirs is reached, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 154/254: RELEASE-NOTES: synced with 052a14e3c, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 252/254: mk-lib1521.pl: updated to match the test changes in 916ec30a, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 204/254: coverage: run event tests too, gnunet, 2017/06/17