gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 07/31: test_https_session_info: fixed compiler warning w


From: gnunet
Subject: [libmicrohttpd] 07/31: test_https_session_info: fixed compiler warning with old libcurl
Date: Mon, 10 Oct 2022 13:00:52 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 26c6ba57bd2939d6f15e7e59419bdd5e05bf2097
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Oct 5 11:53:39 2022 +0300

    test_https_session_info: fixed compiler warning with old libcurl
---
 src/testcurl/https/test_https_session_info.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/testcurl/https/test_https_session_info.c 
b/src/testcurl/https/test_https_session_info.c
index e3b2b428..8d74feb2 100644
--- a/src/testcurl/https/test_https_session_info.c
+++ b/src/testcurl/https/test_https_session_info.c
@@ -35,7 +35,8 @@
 #include "tls_test_common.h"
 #include "tls_test_keys.h"
 
-struct MHD_Daemon *d;
+#if LIBCURL_VERSION_NUM >= 0x072200
+static struct MHD_Daemon *d;
 
 /*
  * HTTP access handler call back
@@ -93,7 +94,6 @@ query_session_ahc (void *cls, struct MHD_Connection 
*connection,
 /**
  * negotiate a secure connection with server & query negotiated security 
parameters
  */
-#if LIBCURL_VERSION_NUM >= 0x072200
 static unsigned int
 test_query_session (void)
 {
@@ -183,12 +183,9 @@ test_query_session (void)
 }
 
 
-#endif
-
 int
 main (int argc, char *const *argv)
 {
-#if LIBCURL_VERSION_NUM >= 0x072200
   unsigned int errorCount = 0;
   const char *ssl_version;
   (void) argc;   /* Unused. Silent compiler warning. */
@@ -219,9 +216,19 @@ main (int argc, char *const *argv)
   print_test_result (errorCount, argv[0]);
   curl_global_cleanup ();
   return errorCount != 0 ? 1 : 0;
+}
+
+
 #else  /* LIBCURL_VERSION_NUM < 0x072200 */
+
+int
+main (int argc, char *const *argv)
+{
   (void) argc; (void) argv;   /* Unused. Silent compiler warning. */
-  (void) query_session_ahc; /* Mute compiler warning */
+  fprintf (stderr, "libcurl version 7.34.0 or later is required.\n" \
+           "Cannot run the test.\n");
   return 77;
-#endif /* LIBCURL_VERSION_NUM < 0x072200 */
 }
+
+
+#endif /* LIBCURL_VERSION_NUM < 0x072200 */

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