gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (c6589426 -> 6d7f0a8f)


From: gnunet
Subject: [libmicrohttpd] branch master updated (c6589426 -> 6d7f0a8f)
Date: Wed, 23 Dec 2020 20:41:58 +0100

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from c6589426 Improved vector-send handling on W32
     new aee82048 Even more reduced number of test iterations on W32 to avoid 
ports exhaust
     new 6d7f0a8f Fixed and muted compiler warnings

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/microhttpd/mhd_itc_types.h                |  5 +++--
 src/microhttpd/mhd_sockets.c                  |  1 +
 src/microhttpd/test_postprocessor.c           |  3 +++
 src/microhttpd/test_postprocessor_md.c        | 18 ++++++++++++++++++
 src/testcurl/https/test_https_get.c           |  2 +-
 src/testcurl/perf_get.c                       |  8 ++++++++
 src/testcurl/perf_get_concurrent.c            |  2 +-
 src/testcurl/test_add_conn.c                  | 12 +++++++++---
 src/testcurl/test_digestauth.c                | 19 ++++++++++---------
 src/testcurl/test_digestauth_sha256.c         | 23 ++++++++++++-----------
 src/testcurl/test_digestauth_with_arguments.c | 17 +++++++++--------
 11 files changed, 75 insertions(+), 35 deletions(-)

diff --git a/src/microhttpd/mhd_itc_types.h b/src/microhttpd/mhd_itc_types.h
index bb354d37..04d30239 100644
--- a/src/microhttpd/mhd_itc_types.h
+++ b/src/microhttpd/mhd_itc_types.h
@@ -67,7 +67,7 @@ struct MHD_itc_
 /**
  * Static initialiser for struct MHD_itc_
  */
-#define MHD_ITC_STATIC_INIT_INVALID { -1, -1 }
+#define MHD_ITC_STATIC_INIT_INVALID { { -1, -1 } }
 
 
 #elif defined(_MHD_ITC_SOCKETPAIR)
@@ -86,7 +86,8 @@ struct MHD_itc_
 /**
  * Static initialiser for struct MHD_itc_
  */
-#define MHD_ITC_STATIC_INIT_INVALID { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET }
+#define MHD_ITC_STATIC_INIT_INVALID \
+  { { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET } }
 
 #endif /* _MHD_ITC_SOCKETPAIR */
 
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index a00330a3..ef3dc35d 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -538,6 +538,7 @@ MHD_socket_cork_ (MHD_socket sock,
 #endif
 #else
   /* do not have MHD_TCP_CORK_NOPUSH at all */
+  (void) sock; (void) on; /* Mute compiler warnings */
   return 0;
 #endif
 }
diff --git a/src/microhttpd/test_postprocessor.c 
b/src/microhttpd/test_postprocessor.c
index b77bfb26..4c2ec2e7 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -462,6 +462,9 @@ value_checker2 (void *cls,
                 uint64_t off,
                 size_t size)
 {
+  (void) cls; (void) kind; (void) key; /* Mute compiler warnings */
+  (void) filename; (void) content_type; (void) transfer_encoding;
+  (void) data; (void) off; (void) size;
   return MHD_YES;
 }
 
diff --git a/src/microhttpd/test_postprocessor_md.c 
b/src/microhttpd/test_postprocessor_md.c
index 2d1cae61..e07a94c3 100644
--- a/src/microhttpd/test_postprocessor_md.c
+++ b/src/microhttpd/test_postprocessor_md.c
@@ -50,6 +50,8 @@ MHD_lookup_connection_value_n (struct MHD_Connection 
*connection,
                                const char **value_ptr,
                                size_t *value_size_ptr)
 {
+  (void) connection; (void) kind; (void) key; /* Mute compiler warnings */
+  (void) key_size; (void) value_ptr; (void) value_size_ptr;
   return MHD_NO;
 }
 
@@ -73,6 +75,9 @@ post_data_iterator (void *cls,
                     uint64_t off,
                     size_t size)
 {
+  (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */
+  (void) content_type; (void) transfer_encoding;
+  (void) off; /* FIXME: shoudn't be checked? */
 #if DEBUG
   fprintf (stderr,
            "%s\t%s\n",
@@ -120,6 +125,8 @@ post_data_iterator2 (void *cls,
                      uint64_t off,
                      size_t size)
 {
+  (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */
+  (void) content_type; (void) transfer_encoding;
   static char seen[16];
 
 #if DEBUG
@@ -154,6 +161,9 @@ post_data_iterator3 (void *cls,
                      uint64_t off,
                      size_t size)
 {
+  (void) cls; (void) kind; (void) filename; /* Mute compiler warnings */
+  (void) content_type; (void) transfer_encoding;
+  (void) off; /* FIXME: shoudn't be checked? */
 #if DEBUG
   fprintf (stderr,
            "%s\t%s\n",
@@ -182,6 +192,9 @@ post_data_iterator4 (void *cls,
                      uint64_t off,
                      size_t size)
 {
+  (void) cls; (void) kind; (void) key; /* Mute compiler warnings */
+  (void) filename; (void) content_type; (void) transfer_encoding;
+  (void) off; /* FIXME: shoudn't be checked? */
 #if DEBUG
   fprintf (stderr,
            "%s\t%s\n",
@@ -207,6 +220,10 @@ post_data_iterator5 (void *cls,
                      uint64_t off,
                      size_t size)
 {
+  (void) cls; (void) kind; (void) key; /* Mute compiler warnings */
+  (void) filename; (void) content_type; (void) transfer_encoding;
+  (void) data; (void) off; (void) size;
+
   found++;
   return MHD_YES;
 }
@@ -215,6 +232,7 @@ post_data_iterator5 (void *cls,
 int
 main (int argc, char *argv[])
 {
+  (void) argc; (void) argv;
   struct MHD_PostProcessor *postprocessor;
 
   {
diff --git a/src/testcurl/https/test_https_get.c 
b/src/testcurl/https/test_https_get.c
index ab0dd9cf..b3f2fbf7 100644
--- a/src/testcurl/https/test_https_get.c
+++ b/src/testcurl/https/test_https_get.c
@@ -236,7 +236,7 @@ main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
   const char *aes256_sha_tlsv1   = "AES256-SHA";
-  (void) argc;   /* Unused. Silent compiler warning. */
+  (void) argc; (void) argv;   /* Unused. Silent compiler warning. */
 
 #ifdef MHD_HTTPS_REQUIRE_GRYPT
   gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c
index d80db06e..0627bf53 100644
--- a/src/testcurl/perf_get.c
+++ b/src/testcurl/perf_get.c
@@ -62,7 +62,15 @@
  * How many rounds of operations do we do for each
  * test?
  */
+#if MHD_CPU_COUNT > 8
+#ifndef _WIN32
+#define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT)
+#else /* _WIN32 */
+#define ROUNDS (1 + (3000 / 12) / MHD_CPU_COUNT)
+#endif /* _WIN32 */
+#else
 #define ROUNDS 500
+#endif
 
 /**
  * Do we use HTTP 1.1?
diff --git a/src/testcurl/perf_get_concurrent.c 
b/src/testcurl/perf_get_concurrent.c
index c58890cc..0cfd1366 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -59,7 +59,7 @@
 #ifndef _WIN32
 #define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT)
 #else /* _WIN32 */
-#define ROUNDS (1 + (10000 / 12) / MHD_CPU_COUNT)
+#define ROUNDS (1 + (3000 / 12) / MHD_CPU_COUNT)
 #endif /* _WIN32 */
 #else
 #define ROUNDS 500
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c
index 6b9ef45d..daa45206 100644
--- a/src/testcurl/test_add_conn.c
+++ b/src/testcurl/test_add_conn.c
@@ -260,9 +260,11 @@ static MHD_socket
 createListeningSocket (int *pport)
 {
   MHD_socket skt;
-  static const int on = 1;
   struct sockaddr_in sin;
   socklen_t sin_len;
+#ifdef MHD_POSIX_SOCKETS
+  static const int on = 1;
+#endif /* MHD_POSIX_SOCKETS */
 
   skt = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
   if (MHD_INVALID_SOCKET == skt)
@@ -286,11 +288,11 @@ createListeningSocket (int *pport)
   if (0 == *pport)
   {
     memset (&sin, 0, sizeof(sin));
-    sin_len = sizeof(sin);
+    sin_len = (socklen_t) sizeof(sin);
     if (0 != getsockname (skt, (struct sockaddr *) &sin, &sin_len))
       externalErrorExitDesc ("getsockname() failed");
 
-    if (sizeof(sin) < sin_len)
+    if (sizeof(sin) < (size_t) sin_len)
       externalErrorExitDesc ("getsockname() failed");
 
     if (AF_INET != sin.sin_family)
@@ -1119,6 +1121,7 @@ main (int argc, char *const *argv)
   verbose = ! has_param (argc, argv, "-q") || has_param (argc, argv, 
"--quiet");
   if (cleanup_test)
   {
+#ifndef _WIN32
     /* Find system limit for number of open FDs. */
 #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
     sys_max_fds = sysconf (_SC_OPEN_MAX);
@@ -1135,6 +1138,9 @@ main (int argc, char *const *argv)
       if (2 > CLEANUP_MAX_DAEMONS (sys_max_fds))
         return 77; /* Multithreaded test cannot be run */
     }
+#else  /* _WIN32 */
+    sys_max_fds = 120; /* W32 has problems with ports exhaust */
+#endif /* _WIN32 */
   }
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 99;
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index 6a82c5a2..389cfd5a 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -91,6 +91,7 @@ ahc_echo (void *cls,
   const char *password = "testpass";
   const char *realm = "test@example.com";
   enum MHD_Result ret;
+  int ret_i;
   (void) cls; (void) url;                         /* Unused. Silent compiler 
warning. */
   (void) method; (void) version; (void) upload_data; /* Unused. Silent 
compiler warning. */
   (void) upload_data_size; (void) unused;         /* Unused. Silent compiler 
warning. */
@@ -110,14 +111,14 @@ ahc_echo (void *cls,
     MHD_destroy_response (response);
     return ret;
   }
-  ret = MHD_digest_auth_check (connection,
-                               realm,
-                               username,
-                               password,
-                               300);
+  ret_i = MHD_digest_auth_check (connection,
+                                 realm,
+                                 username,
+                                 password,
+                                 300);
   free (username);
-  if ( (ret == MHD_INVALID_NONCE) ||
-       (ret == MHD_NO) )
+  if ( (ret_i == MHD_INVALID_NONCE) ||
+       (ret_i == MHD_NO) )
   {
     response = MHD_create_response_from_buffer (strlen (DENIED),
                                                 DENIED,
@@ -128,8 +129,8 @@ ahc_echo (void *cls,
                                         realm,
                                         MY_OPAQUE,
                                         response,
-                                        (MHD_INVALID_NONCE == ret) ? MHD_YES :
-                                        MHD_NO);
+                                        (MHD_INVALID_NONCE == ret_i) ?
+                                        MHD_YES : MHD_NO);
     MHD_destroy_response (response);
     return ret;
   }
diff --git a/src/testcurl/test_digestauth_sha256.c 
b/src/testcurl/test_digestauth_sha256.c
index 4088dc32..5023bcad 100644
--- a/src/testcurl/test_digestauth_sha256.c
+++ b/src/testcurl/test_digestauth_sha256.c
@@ -92,6 +92,7 @@ ahc_echo (void *cls,
   const char *password = "testpass";
   const char *realm = "test@example.com";
   enum MHD_Result ret;
+  int ret_i;
   (void) cls; (void) url;                         /* Unused. Silent compiler 
warning. */
   (void) method; (void) version; (void) upload_data; /* Unused. Silent 
compiler warning. */
   (void) upload_data_size; (void) unused;         /* Unused. Silent compiler 
warning. */
@@ -112,15 +113,15 @@ ahc_echo (void *cls,
     MHD_destroy_response (response);
     return ret;
   }
-  ret = MHD_digest_auth_check2 (connection,
-                                realm,
-                                username,
-                                password,
-                                300,
-                                MHD_DIGEST_ALG_SHA256);
+  ret_i = MHD_digest_auth_check2 (connection,
+                                  realm,
+                                  username,
+                                  password,
+                                  300,
+                                  MHD_DIGEST_ALG_SHA256);
   free (username);
-  if ( (ret == MHD_INVALID_NONCE) ||
-       (ret == MHD_NO) )
+  if ( (ret_i == MHD_INVALID_NONCE) ||
+       (ret_i == MHD_NO) )
   {
     response = MHD_create_response_from_buffer (strlen (DENIED),
                                                 DENIED,
@@ -131,8 +132,8 @@ ahc_echo (void *cls,
                                          realm,
                                          MY_OPAQUE,
                                          response,
-                                         (MHD_INVALID_NONCE == ret) ? MHD_YES :
-                                         MHD_NO,
+                                         (MHD_INVALID_NONCE == ret_i) ?
+                                         MHD_YES : MHD_NO,
                                          MHD_DIGEST_ALG_SHA256);
     MHD_destroy_response (response);
     return ret;
@@ -297,7 +298,7 @@ main (int argc, char *const *argv)
   (void) argc; (void) argv; /* Unused. Silent compiler warning. */
 
 #ifdef CURL_VERSION_SSPI
-  if (0 != (d->features | CURL_VERSION_SSPI))
+  if (0 != (d->features & CURL_VERSION_SSPI))
     return 77; /* Skip test, W32 SSPI doesn't support sha256 digest */
 #endif /* CURL_VERSION_SSPI */
 
diff --git a/src/testcurl/test_digestauth_with_arguments.c 
b/src/testcurl/test_digestauth_with_arguments.c
index 3d90f0db..c6154ffb 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -85,6 +85,7 @@ ahc_echo (void *cls,
   const char *password = "testpass";
   const char *realm = "test@example.com";
   enum MHD_Result ret;
+  int ret_i;
   (void) cls; (void) url;                         /* Unused. Silent compiler 
warning. */
   (void) method; (void) version; (void) upload_data; /* Unused. Silent 
compiler warning. */
   (void) upload_data_size; (void) unused;         /* Unused. Silent compiler 
warning. */
@@ -103,13 +104,13 @@ ahc_echo (void *cls,
     MHD_destroy_response (response);
     return ret;
   }
-  ret = MHD_digest_auth_check (connection, realm,
-                               username,
-                               password,
-                               300);
+  ret_i = MHD_digest_auth_check (connection, realm,
+                                 username,
+                                 password,
+                                 300);
   free (username);
-  if ( (ret == MHD_INVALID_NONCE) ||
-       (ret == MHD_NO) )
+  if ( (ret_i == MHD_INVALID_NONCE) ||
+       (ret_i == MHD_NO) )
   {
     response = MHD_create_response_from_buffer (strlen (DENIED),
                                                 DENIED,
@@ -119,8 +120,8 @@ ahc_echo (void *cls,
     ret = MHD_queue_auth_fail_response (connection, realm,
                                         MY_OPAQUE,
                                         response,
-                                        (ret == MHD_INVALID_NONCE) ? MHD_YES :
-                                        MHD_NO);
+                                        (ret_i == MHD_INVALID_NONCE) ?
+                                        MHD_YES : MHD_NO);
     MHD_destroy_response (response);
     return ret;
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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