gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: eliminate compiler w


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: eliminate compiler warnings
Date: Mon, 20 May 2019 14:40:06 +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 73380b54 eliminate compiler warnings
73380b54 is described below

commit 73380b54a12b5b4bc49d8f944e89c8c5b5c1a4fb
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon May 20 14:39:35 2019 +0200

    eliminate compiler warnings
---
 src/testcurl/test_callback.c |  3 ++-
 src/testcurl/test_get.c      | 12 ++++--------
 src/testcurl/test_put.c      |  6 +-----
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c
index 2323217b..34bf8679 100644
--- a/src/testcurl/test_callback.c
+++ b/src/testcurl/test_callback.c
@@ -38,8 +38,9 @@ static ssize_t
 called_twice(void *cls, uint64_t pos, char *buf, size_t max)
 {
   struct callback_closure *cls2 = cls;
-  (void)pos;    /* Unused. Silent compiler warning. */
 
+  (void) pos;    /* Unused. Silence compiler warning. */
+  (void) max;
   if (cls2->called == 0)
     {
       memcpy(buf, "test", 5);
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index 2a22432d..841c2ffd 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -17,14 +17,12 @@
      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
      Boston, MA 02110-1301, USA.
 */
-
 /**
  * @file test_get.c
  * @brief  Testcase for libmicrohttpd GET operations
  *         TODO: test parsing of query
  * @author Christian Grothoff
  */
-
 #include "MHD_config.h"
 #include "platform.h"
 #include <curl/curl.h>
@@ -85,6 +83,8 @@ log_cb (void *cls,
         const char *uri,
         struct MHD_Connection *con)
 {
+  (void) cls;
+  (void) con;
   if (0 != strcmp (uri,
                    EXPECTED_URI_PATH))
     {
@@ -379,11 +379,7 @@ testExternalGet ()
   fd_set ws;
   fd_set es;
   MHD_socket maxsock;
-#ifdef MHD_WINSOCK_SOCKETS
-  int maxposixs; /* Max socket number unused on W32 */
-#else  /* MHD_POSIX_SOCKETS */
-#define maxposixs maxsock
-#endif /* MHD_POSIX_SOCKETS */
+  int maxposixs; 
   int running;
   struct CURLMsg *msg;
   time_t start;
@@ -478,7 +474,7 @@ testExternalGet ()
       tv.tv_sec = 0;
       tv.tv_usec = 1000;
       if (maxsock > maxposixs)
-       maxposixs = maxsock;
+        maxposixs = maxsock;
       if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
         {
 #ifdef MHD_POSIX_SOCKETS
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c
index 3df97526..11e99cc3 100644
--- a/src/testcurl/test_put.c
+++ b/src/testcurl/test_put.c
@@ -360,11 +360,7 @@ testExternalPut ()
   fd_set ws;
   fd_set es;
   MHD_socket maxsock;
-#ifdef MHD_WINSOCK_SOCKETS
   int maxposixs; /* Max socket number unused on W32 */
-#else  /* MHD_POSIX_SOCKETS */
-#define maxposixs maxsock
-#endif /* MHD_POSIX_SOCKETS */
   int running;
   struct CURLMsg *msg;
   time_t start;
@@ -463,7 +459,7 @@ curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
           return 4096;
         }
       if (maxsock > maxposixs)
-       maxposixs = maxsock;
+        maxposixs = maxsock;
       tv.tv_sec = 0;
       tv.tv_usec = 1000;
       if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))

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



reply via email to

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