gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: fix more warnings


From: gnunet
Subject: [libmicrohttpd] branch master updated: fix more warnings
Date: Sat, 11 Apr 2020 11:33:11 +0200

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

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 912181af fix more warnings
912181af is described below

commit 912181afd31184ae6739b927315d09c13a952f73
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Apr 11 11:28:36 2020 +0200

    fix more warnings
---
 src/examples/digest_auth_example.c | 9 +++++----
 src/microhttpd/mhd_send.c          | 8 ++++----
 src/microhttpd/postprocessor.c     | 2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/examples/digest_auth_example.c 
b/src/examples/digest_auth_example.c
index e3edf206..073726ad 100644
--- a/src/examples/digest_auth_example.c
+++ b/src/examples/digest_auth_example.c
@@ -46,6 +46,7 @@ ahc_echo (void *cls,
   char *username;
   const char *password = "testpass";
   const char *realm = "address@hidden";
+  int res;
   enum MHD_Result ret;
   (void) cls;               /* Unused. Silent compiler warning. */
   (void) url;               /* Unused. Silent compiler warning. */
@@ -68,13 +69,13 @@ ahc_echo (void *cls,
     MHD_destroy_response (response);
     return ret;
   }
-  ret = MHD_digest_auth_check (connection, realm,
+  res = MHD_digest_auth_check (connection, realm,
                                username,
                                password,
                                300);
   MHD_free (username);
-  if ( (ret == MHD_INVALID_NONCE) ||
-       (ret == MHD_NO) )
+  if ( (res == MHD_INVALID_NONCE) ||
+       (res == MHD_NO) )
   {
     response = MHD_create_response_from_buffer (strlen (DENIED),
                                                 DENIED,
@@ -84,7 +85,7 @@ ahc_echo (void *cls,
     ret = MHD_queue_auth_fail_response (connection, realm,
                                         MY_OPAQUE_STR,
                                         response,
-                                        (ret == MHD_INVALID_NONCE) ? MHD_YES :
+                                        (res == MHD_INVALID_NONCE) ? MHD_YES :
                                         MHD_NO);
     MHD_destroy_response (response);
     return ret;
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index fd6297aa..0864d532 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -357,7 +357,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
     else if (buffer_size > (size_t) ret)
       connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;
 #endif /* EPOLL_SUPPORT */
-    if (ret == buffer_size)
+    if (buffer_size == (size_t) ret)
       post_cork_setsockopt (connection, want_cork);
   }
 
@@ -398,7 +398,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
                                    header,
                                    header_size,
                                    MHD_SSO_HDR_CORK);
-    if ( (ret == header_size) &&
+    if ( (header_size == (size_t) ret) &&
          (0 == buffer_size) &&
          connection->sk_cork_on)
     {
@@ -443,7 +443,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
 
   /* Only if we succeeded sending the full buffer, we need to make sure that
      the OS flushes at the end */
-  if (ret == header_size + buffer_size)
+  if (header_size + buffer_size == (size_t) ret)
     post_cork_setsockopt (connection, false);
 
   return ret;
@@ -665,7 +665,7 @@ MHD_send_sendfile_ (struct MHD_Connection *connection)
 
   /* Make sure we send the data without delay ONLY if we
      provided the complete response (not on partial write) */
-  if (ret == left)
+  if (left == (uint64_t) ret)
     post_cork_setsockopt (connection, false);
 
   return ret;
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 0069147b..9c464152 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -391,7 +391,7 @@ process_value (struct MHD_PostProcessor *pp,
   pp->xbuf_pos = 0;
   if (NULL != last_escape)
   {
-    if (value_end - last_escape < sizeof (pp->xbuf))
+    if (((size_t) (value_end - last_escape)) < sizeof (pp->xbuf))
     {
       pp->xbuf_pos = value_end - last_escape;
       memcpy (pp->xbuf,

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



reply via email to

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