[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.
- [libmicrohttpd] branch master updated (30ef790c -> c930fe1a), gnunet, 2022/10/10
- [libmicrohttpd] 04/31: testcurl/https: stopped CA file creation/removal, gnunet, 2022/10/10
- [libmicrohttpd] 05/31: testcurl/https: removed explicit cipher setting, gnunet, 2022/10/10
- [libmicrohttpd] 01/31: Removed curl_version_check, gnunet, 2022/10/10
- [libmicrohttpd] 07/31: test_https_session_info: fixed compiler warning with old libcurl,
gnunet <=
- [libmicrohttpd] 12/31: test_https_time_out: second attempt to really check something with this test, gnunet, 2022/10/10
- [libmicrohttpd] 02/31: testcurl/https: fixed functions declarations, gnunet, 2022/10/10
- [libmicrohttpd] 03/31: testcurl/https: fixed compiler warnings, wrong types, gnunet, 2022/10/10
- [libmicrohttpd] 06/31: testcurl/https: do not enforce TLSv1, gnunet, 2022/10/10
- [libmicrohttpd] 08/31: testcurl/https: removed usage of deprecated libcurl parameter, gnunet, 2022/10/10
- [libmicrohttpd] 10/31: test_https_get_parallel{,_threads}: removed artificial delay, gnunet, 2022/10/10
- [libmicrohttpd] 13/31: MHD_start_daemon(): minor readability improvement, gnunet, 2022/10/10
- [libmicrohttpd] 14/31: microhttpd.h: improved doxy for MHD_USE_THREAD_PER_CONNECTION, gnunet, 2022/10/10
- [libmicrohttpd] 15/31: MHD_run_wait(): improved readability, gnunet, 2022/10/10
- [libmicrohttpd] 11/31: daemon: fixed delayed notification callback in thread-per-connection mode, gnunet, 2022/10/10