gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/04: test_options: fixed compiler warnings, removed de


From: gnunet
Subject: [libmicrohttpd] 01/04: test_options: fixed compiler warnings, removed dead code
Date: Tue, 14 Jun 2022 13:30:39 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit e4011fe55bc820b2037e9dd5c9076cc931ff90ed
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Jun 14 13:00:14 2022 +0300

    test_options: fixed compiler warnings, removed dead code
---
 src/microhttpd/test_options.c | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/microhttpd/test_options.c b/src/microhttpd/test_options.c
index 655ca828..deff9b92 100644
--- a/src/microhttpd/test_options.c
+++ b/src/microhttpd/test_options.c
@@ -28,13 +28,6 @@
 #include "microhttpd.h"
 #include "mhd_sockets.h"
 
-#define MHD_E_MEM "Error: memory error\n"
-#define MHD_E_SERVER_INIT "Error: failed to start server\n"
-
-const int DEBUG_GNUTLS_LOG_LEVEL = 0;
-const char *test_file_name = "https_test_file";
-const char test_file_data[] = "Hello World\n";
-
 static enum MHD_Result
 ahc_echo (void *cls,
           struct MHD_Connection *connection,
@@ -57,10 +50,10 @@ ahc_echo (void *cls,
 }
 
 
-static int
-test_wrap_loc (char *test_name, int (*test)(void))
+static unsigned int
+test_wrap_loc (const char *test_name, unsigned int (*test)(void))
 {
-  int ret;
+  unsigned int ret;
 
   fprintf (stdout, "running test: %s ", test_name);
   ret = test ();
@@ -79,8 +72,8 @@ test_wrap_loc (char *test_name, int (*test)(void))
 /**
  * Test daemon initialization with the MHD_OPTION_SOCK_ADDR option
  */
-static int
-test_ip_addr_option ()
+static unsigned int
+test_ip_addr_option (void)
 {
   struct MHD_Daemon *d;
   struct sockaddr_in daemon_ip_addr;
@@ -105,7 +98,7 @@ test_ip_addr_option ()
                         &daemon_ip_addr, MHD_OPTION_END);
 
   if (d == 0)
-    return -1;
+    return 1;
 
   MHD_stop_daemon (d);
 
@@ -115,7 +108,7 @@ test_ip_addr_option ()
                         &daemon_ip_addr6, MHD_OPTION_END);
 
   if (d == 0)
-    return -1;
+    return 1;
 
   MHD_stop_daemon (d);
 #endif

-- 
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]