gnunet-svn
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]