gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 02/02: Additional compiler warnings fixes.


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 02/02: Additional compiler warnings fixes.
Date: Tue, 31 Oct 2017 09:19:52 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 424abcd21daf7000fa826a03de6188ea608a50ec
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Tue Oct 31 11:16:26 2017 +0300

    Additional compiler warnings fixes.
---
 src/examples/demo.c                           | 1 +
 src/examples/demo_https.c                     | 3 ++-
 src/testcurl/https/tls_test_common.c          | 6 +++---
 src/testcurl/test_digestauth.c                | 2 +-
 src/testcurl/test_digestauth_with_arguments.c | 2 +-
 src/testcurl/test_get_response_cleanup.c      | 4 ++++
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/examples/demo.c b/src/examples/demo.c
index 0b177357..6c9ad049 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -832,6 +832,7 @@ generate_page (void *cls,
 static void
 catcher (int sig)
 {
+  (void)sig;   /* Unused. Silent compiler warning. */
   /* do nothing */
 }
 
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
index 85c369b6..806464a2 100644
--- a/src/examples/demo_https.c
+++ b/src/examples/demo_https.c
@@ -831,6 +831,7 @@ generate_page (void *cls,
 static void
 catcher (int sig)
 {
+  (void)sig;   /* Unused. Silent compiler warning. */
   /* do nothing */
 }
 
@@ -839,7 +840,7 @@ catcher (int sig)
  * setup handlers to ignore SIGPIPE.
  */
 static void
-ignore_sigpipe ()
+ignore_sigpipe (void)
 {
   struct sigaction oldsig;
   struct sigaction sig;
diff --git a/src/testcurl/https/tls_test_common.c 
b/src/testcurl/https/tls_test_common.c
index 54466a2a..be13ad36 100644
--- a/src/testcurl/https/tls_test_common.c
+++ b/src/testcurl/https/tls_test_common.c
@@ -27,8 +27,6 @@
 #include "tls_test_keys.h"
 
 
-int curl_check_version (const char *req_version, ...);
-
 FILE *
 setup_ca_cert ()
 {
@@ -278,13 +276,15 @@ gen_test_file_url (char *url,
   int ret = 0;
   char *doc_path;
   size_t doc_path_len;
-  size_t i;
   /* setup test file path, url */
 #ifdef PATH_MAX
   doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX;
 #else  /* ! PATH_MAX */
   doc_path_len = 4096;
 #endif /* ! PATH_MAX */
+#ifdef WINDOWS
+  size_t i;
+#endif /* ! WINDOWS */
   if (NULL == (doc_path = malloc (doc_path_len)))
     {
       fprintf (stderr, MHD_E_MEM);
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index e107da2a..48c7a87a 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -170,7 +170,7 @@ testDigestAuth ()
   while (off < 8)
     {
       len = read(fd, rnd, 8);
-      if (len == -1)
+      if (len == (size_t)-1)
         {
           fprintf(stderr, "Failed to read `%s': %s\n",
                   "/dev/urandom",
diff --git a/src/testcurl/test_digestauth_with_arguments.c 
b/src/testcurl/test_digestauth_with_arguments.c
index 72578376..107d2256 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -165,7 +165,7 @@ testDigestAuth ()
   while (off < 8)
        {
          len = read(fd, rnd, 8);
-         if (len == -1)
+         if (len == (size_t)-1)
            {
                  fprintf(stderr, "Failed to read `%s': %s\n",
                       "/dev/urandom",
diff --git a/src/testcurl/test_get_response_cleanup.c 
b/src/testcurl/test_get_response_cleanup.c
index d2ab119d..0189a1c1 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -95,6 +95,8 @@ kill_curl (pid_t pid)
 static ssize_t
 push_callback (void *cls, uint64_t pos, char *buf, size_t max)
 {
+  (void)cls;(void)pos; /* Unused. Silent compiler warning. */
+
   if (max == 0)
     return 0;
   buf[0] = 'd';
@@ -125,6 +127,8 @@ ahc_echo (void *cls,
   const char *me = cls;
   struct MHD_Response *response;
   int ret;
+  (void)url;(void)version;                      /* Unused. Silent compiler 
warning. */
+  (void)upload_data;(void)upload_data_size;     /* Unused. Silent compiler 
warning. */
 
   //fprintf (stderr, "In CB: %s!\n", method);
   if (0 != strcmp (me, method))

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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