diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-10-30 23:36:21 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-10-30 23:37:44 +0300 |
commit | 28f723b238181f10f3bd86de84a4c4621e62a712 (patch) | |
tree | a4af6b4c4a94cf0854ce3f3b00d3de56ce2ba89f /src/testcurl | |
parent | dc96775e3210bce764284d46be5fd889d63ef0b8 (diff) | |
download | libmicrohttpd-28f723b238181f10f3bd86de84a4c4621e62a712.tar.gz libmicrohttpd-28f723b238181f10f3bd86de84a4c4621e62a712.zip |
Silenced compiler warnings in src/testcurl/https, minor fixes.
Diffstat (limited to 'src/testcurl')
-rw-r--r-- | src/testcurl/https/test_empty_response.c | 5 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get.c | 1 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel.c | 3 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel_threads.c | 3 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_select.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_multi_daemon.c | 6 | ||||
-rw-r--r-- | src/testcurl/https/test_https_session_info.c | 6 | ||||
-rw-r--r-- | src/testcurl/https/test_https_sni.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 3 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_authentication.c | 7 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_options.c | 2 | ||||
-rw-r--r-- | src/testcurl/https/tls_test_common.c | 22 |
12 files changed, 44 insertions, 22 deletions
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c index d4a15168..ba7136a8 100644 --- a/src/testcurl/https/test_empty_response.c +++ b/src/testcurl/https/test_empty_response.c | |||
@@ -35,8 +35,6 @@ | |||
35 | 35 | ||
36 | extern const char srv_key_pem[]; | 36 | extern const char srv_key_pem[]; |
37 | extern const char srv_self_signed_cert_pem[]; | 37 | extern const char srv_self_signed_cert_pem[]; |
38 | extern const char srv_signed_cert_pem[]; | ||
39 | extern const char srv_signed_key_pem[]; | ||
40 | 38 | ||
41 | static int oneone; | 39 | static int oneone; |
42 | 40 | ||
@@ -51,6 +49,8 @@ ahc_echo (void *cls, | |||
51 | { | 49 | { |
52 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
53 | int ret; | 51 | int ret; |
52 | (void)cls;(void)url;(void)method;(void)version; /* Unused. Silent compiler warning. */ | ||
53 | (void)upload_data;(void)upload_data_size;(void)unused; /* Unused. Silent compiler warning. */ | ||
54 | 54 | ||
55 | response = MHD_create_response_from_buffer (0, NULL, | 55 | response = MHD_create_response_from_buffer (0, NULL, |
56 | MHD_RESPMEM_PERSISTENT); | 56 | MHD_RESPMEM_PERSISTENT); |
@@ -220,6 +220,7 @@ int | |||
220 | main (int argc, char *const *argv) | 220 | main (int argc, char *const *argv) |
221 | { | 221 | { |
222 | unsigned int errorCount = 0; | 222 | unsigned int errorCount = 0; |
223 | (void)argc; /* Unused. Silent compiler warning. */ | ||
223 | 224 | ||
224 | if (0 != curl_global_init (CURL_GLOBAL_ALL)) | 225 | if (0 != curl_global_init (CURL_GLOBAL_ALL)) |
225 | { | 226 | { |
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index dfbf5dbc..7573315d 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -131,6 +131,7 @@ main (int argc, char *const *argv) | |||
131 | unsigned int errorCount = 0; | 131 | unsigned int errorCount = 0; |
132 | const char *aes256_sha_tlsv1 = "AES256-SHA"; | 132 | const char *aes256_sha_tlsv1 = "AES256-SHA"; |
133 | const char *des_cbc3_sha_tlsv1 = "DES-CBC3-SHA"; | 133 | const char *des_cbc3_sha_tlsv1 = "DES-CBC3-SHA"; |
134 | (void)argc; /* Unused. Silent compiler warning. */ | ||
134 | 135 | ||
135 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 136 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
136 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 137 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c index 89fd6a05..91d870d8 100644 --- a/src/testcurl/https/test_https_get_parallel.c +++ b/src/testcurl/https/test_https_get_parallel.c | |||
@@ -84,6 +84,7 @@ test_single_client (void *cls, int port, const char *cipher_suite, | |||
84 | void *client_thread_ret; | 84 | void *client_thread_ret; |
85 | struct https_test_data client_args = | 85 | struct https_test_data client_args = |
86 | { NULL, port, cipher_suite, curl_proto_version }; | 86 | { NULL, port, cipher_suite, curl_proto_version }; |
87 | (void)cls; /* Unused. Silent compiler warning. */ | ||
87 | 88 | ||
88 | client_thread_ret = https_transfer_thread_adapter (&client_args); | 89 | client_thread_ret = https_transfer_thread_adapter (&client_args); |
89 | if (client_thread_ret != NULL) | 90 | if (client_thread_ret != NULL) |
@@ -109,6 +110,7 @@ test_parallel_clients (void * cls, int port, const char *cipher_suite, | |||
109 | pthread_t client_arr[client_count]; | 110 | pthread_t client_arr[client_count]; |
110 | struct https_test_data client_args = | 111 | struct https_test_data client_args = |
111 | { NULL, port, cipher_suite, curl_proto_version }; | 112 | { NULL, port, cipher_suite, curl_proto_version }; |
113 | (void)cls; /* Unused. Silent compiler warning. */ | ||
112 | 114 | ||
113 | for (i = 0; i < client_count; ++i) | 115 | for (i = 0; i < client_count; ++i) |
114 | { | 116 | { |
@@ -138,6 +140,7 @@ main (int argc, char *const *argv) | |||
138 | unsigned int errorCount = 0; | 140 | unsigned int errorCount = 0; |
139 | const char *aes256_sha = "AES256-SHA"; | 141 | const char *aes256_sha = "AES256-SHA"; |
140 | int port; | 142 | int port; |
143 | (void)argc; /* Unused. Silent compiler warning. */ | ||
141 | 144 | ||
142 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 145 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
143 | port = 0; | 146 | port = 0; |
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index f577edd9..832b206f 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -84,6 +84,7 @@ test_single_client (void *cls, int port, const char *cipher_suite, | |||
84 | void *client_thread_ret; | 84 | void *client_thread_ret; |
85 | struct https_test_data client_args = | 85 | struct https_test_data client_args = |
86 | { NULL, port, cipher_suite, curl_proto_version }; | 86 | { NULL, port, cipher_suite, curl_proto_version }; |
87 | (void)cls; /* Unused. Silent compiler warning. */ | ||
87 | 88 | ||
88 | client_thread_ret = https_transfer_thread_adapter (&client_args); | 89 | client_thread_ret = https_transfer_thread_adapter (&client_args); |
89 | if (client_thread_ret != NULL) | 90 | if (client_thread_ret != NULL) |
@@ -109,6 +110,7 @@ test_parallel_clients (void *cls, int port, const char *cipher_suite, | |||
109 | pthread_t client_arr[client_count]; | 110 | pthread_t client_arr[client_count]; |
110 | struct https_test_data client_args = | 111 | struct https_test_data client_args = |
111 | { NULL, port, cipher_suite, curl_proto_version }; | 112 | { NULL, port, cipher_suite, curl_proto_version }; |
113 | (void)cls; /* Unused. Silent compiler warning. */ | ||
112 | 114 | ||
113 | for (i = 0; i < client_count; ++i) | 115 | for (i = 0; i < client_count; ++i) |
114 | { | 116 | { |
@@ -139,6 +141,7 @@ main (int argc, char *const *argv) | |||
139 | unsigned int errorCount = 0; | 141 | unsigned int errorCount = 0; |
140 | const char *ssl_version; | 142 | const char *ssl_version; |
141 | int port; | 143 | int port; |
144 | (void)argc; /* Unused. Silent compiler warning. */ | ||
142 | 145 | ||
143 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 146 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
144 | port = 0; | 147 | port = 0; |
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 06964c82..5e1fa238 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -36,8 +36,6 @@ | |||
36 | 36 | ||
37 | extern const char srv_key_pem[]; | 37 | extern const char srv_key_pem[]; |
38 | extern const char srv_self_signed_cert_pem[]; | 38 | extern const char srv_self_signed_cert_pem[]; |
39 | extern const char srv_signed_cert_pem[]; | ||
40 | extern const char srv_signed_key_pem[]; | ||
41 | 39 | ||
42 | static int oneone; | 40 | static int oneone; |
43 | 41 | ||
@@ -54,6 +52,7 @@ ahc_echo (void *cls, | |||
54 | const char *me = cls; | 52 | const char *me = cls; |
55 | struct MHD_Response *response; | 53 | struct MHD_Response *response; |
56 | int ret; | 54 | int ret; |
55 | (void)version;(void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */ | ||
57 | 56 | ||
58 | if (0 != strcmp (me, method)) | 57 | if (0 != strcmp (me, method)) |
59 | return MHD_NO; /* unexpected method */ | 58 | return MHD_NO; /* unexpected method */ |
@@ -249,6 +248,7 @@ int | |||
249 | main (int argc, char *const *argv) | 248 | main (int argc, char *const *argv) |
250 | { | 249 | { |
251 | unsigned int errorCount = 0; | 250 | unsigned int errorCount = 0; |
251 | (void)argc; /* Unused. Silent compiler warning. */ | ||
252 | 252 | ||
253 | if (0 != curl_global_init (CURL_GLOBAL_ALL)) | 253 | if (0 != curl_global_init (CURL_GLOBAL_ALL)) |
254 | { | 254 | { |
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c index b1c61ba3..75017662 100644 --- a/src/testcurl/https/test_https_multi_daemon.c +++ b/src/testcurl/https/test_https_multi_daemon.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | ||
37 | extern int curl_check_version (const char *req_version, ...); | ||
38 | extern const char srv_key_pem[]; | 37 | extern const char srv_key_pem[]; |
39 | extern const char srv_self_signed_cert_pem[]; | 38 | extern const char srv_self_signed_cert_pem[]; |
40 | 39 | ||
@@ -43,7 +42,7 @@ extern const char srv_self_signed_cert_pem[]; | |||
43 | * doesn't affect the other | 42 | * doesn't affect the other |
44 | */ | 43 | */ |
45 | static int | 44 | static int |
46 | test_concurent_daemon_pair (void *cls, | 45 | test_concurent_daemon_pair (void *cls, |
47 | const char *cipher_suite, | 46 | const char *cipher_suite, |
48 | int proto_version) | 47 | int proto_version) |
49 | { | 48 | { |
@@ -51,6 +50,8 @@ test_concurent_daemon_pair (void *cls, | |||
51 | struct MHD_Daemon *d1; | 50 | struct MHD_Daemon *d1; |
52 | struct MHD_Daemon *d2; | 51 | struct MHD_Daemon *d2; |
53 | int port1, port2; | 52 | int port1, port2; |
53 | (void)cls; /* Unused. Silent compiler warning. */ | ||
54 | |||
54 | 55 | ||
55 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 56 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
56 | port1 = port2 = 0; | 57 | port1 = port2 = 0; |
@@ -127,6 +128,7 @@ main (int argc, char *const *argv) | |||
127 | unsigned int errorCount = 0; | 128 | unsigned int errorCount = 0; |
128 | FILE *cert; | 129 | FILE *cert; |
129 | const char *aes256_sha = "AES256-SHA"; | 130 | const char *aes256_sha = "AES256-SHA"; |
131 | (void)argc; (void)argv; /* Unused. Silent compiler warning. */ | ||
130 | 132 | ||
131 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 133 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
132 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 134 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index f21e03b0..f0bee495 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 32 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
33 | #include "tls_test_common.h" | 33 | #include "tls_test_common.h" |
34 | 34 | ||
35 | extern int curl_check_version (const char *req_version, ...); | ||
36 | extern const char srv_key_pem[]; | 35 | extern const char srv_key_pem[]; |
37 | extern const char srv_self_signed_cert_pem[]; | 36 | extern const char srv_self_signed_cert_pem[]; |
38 | 37 | ||
@@ -45,11 +44,13 @@ struct MHD_Daemon *d; | |||
45 | static int | 44 | static int |
46 | query_session_ahc (void *cls, struct MHD_Connection *connection, | 45 | query_session_ahc (void *cls, struct MHD_Connection *connection, |
47 | const char *url, const char *method, | 46 | const char *url, const char *method, |
48 | const char *upload_data, const char *version, | 47 | const char *version, const char *upload_data, |
49 | size_t *upload_data_size, void **ptr) | 48 | size_t *upload_data_size, void **ptr) |
50 | { | 49 | { |
51 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
52 | int ret; | 51 | int ret; |
52 | (void)cls;(void)url;(void)method;(void)version; /* Unused. Silent compiler warning. */ | ||
53 | (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */ | ||
53 | 54 | ||
54 | if (NULL == *ptr) | 55 | if (NULL == *ptr) |
55 | { | 56 | { |
@@ -190,6 +191,7 @@ main (int argc, char *const *argv) | |||
190 | #if LIBCURL_VERSION_NUM >= 0x072200 | 191 | #if LIBCURL_VERSION_NUM >= 0x072200 |
191 | unsigned int errorCount = 0; | 192 | unsigned int errorCount = 0; |
192 | const char *ssl_version; | 193 | const char *ssl_version; |
194 | (void)argc; /* Unused. Silent compiler warning. */ | ||
193 | 195 | ||
194 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 196 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
195 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 197 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
diff --git a/src/testcurl/https/test_https_sni.c b/src/testcurl/https/test_https_sni.c index 6c1da540..1567730c 100644 --- a/src/testcurl/https/test_https_sni.c +++ b/src/testcurl/https/test_https_sni.c | |||
@@ -145,6 +145,7 @@ sni_callback (gnutls_session_t session, | |||
145 | size_t name_len; | 145 | size_t name_len; |
146 | struct Hosts *host; | 146 | struct Hosts *host; |
147 | unsigned int type; | 147 | unsigned int type; |
148 | (void)req_ca_dn;(void)nreqs;(void)pk_algos;(void)pk_algos_length; /* Unused. Silent compiler warning. */ | ||
148 | 149 | ||
149 | name_len = sizeof (name); | 150 | name_len = sizeof (name); |
150 | if (GNUTLS_E_SUCCESS != | 151 | if (GNUTLS_E_SUCCESS != |
@@ -255,6 +256,7 @@ main (int argc, char *const *argv) | |||
255 | unsigned int error_count = 0; | 256 | unsigned int error_count = 0; |
256 | struct MHD_Daemon *d; | 257 | struct MHD_Daemon *d; |
257 | int port; | 258 | int port; |
259 | (void)argc; /* Unused. Silent compiler warning. */ | ||
258 | 260 | ||
259 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 261 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
260 | port = 0; | 262 | port = 0; |
@@ -315,7 +317,7 @@ main (int argc, char *const *argv) | |||
315 | 317 | ||
316 | #else | 318 | #else |
317 | 319 | ||
318 | int main () | 320 | int main (void) |
319 | { | 321 | { |
320 | fprintf (stderr, | 322 | fprintf (stderr, |
321 | "SNI not supported by GnuTLS < 3.0\n"); | 323 | "SNI not supported by GnuTLS < 3.0\n"); |
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index 587d311c..e46923eb 100644 --- a/src/testcurl/https/test_https_time_out.c +++ b/src/testcurl/https/test_https_time_out.c | |||
@@ -54,7 +54,7 @@ test_tls_session_time_out (gnutls_session_t session, int port) | |||
54 | struct sockaddr_in sa; | 54 | struct sockaddr_in sa; |
55 | 55 | ||
56 | sd = socket (AF_INET, SOCK_STREAM, 0); | 56 | sd = socket (AF_INET, SOCK_STREAM, 0); |
57 | if (sd == -1) | 57 | if (sd == MHD_INVALID_SOCKET) |
58 | { | 58 | { |
59 | fprintf (stderr, "Failed to create socket: %s\n", strerror (errno)); | 59 | fprintf (stderr, "Failed to create socket: %s\n", strerror (errno)); |
60 | return -1; | 60 | return -1; |
@@ -110,6 +110,7 @@ main (int argc, char *const *argv) | |||
110 | gnutls_datum_t cert; | 110 | gnutls_datum_t cert; |
111 | gnutls_certificate_credentials_t xcred; | 111 | gnutls_certificate_credentials_t xcred; |
112 | int port; | 112 | int port; |
113 | (void)argc; /* Unused. Silent compiler warning. */ | ||
113 | 114 | ||
114 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 115 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
115 | port = 0; | 116 | port = 0; |
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c index e3bc2626..734a2a4a 100644 --- a/src/testcurl/https/test_tls_authentication.c +++ b/src/testcurl/https/test_tls_authentication.c | |||
@@ -34,11 +34,6 @@ | |||
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | ||
37 | extern int curl_check_version (const char *req_version, ...); | ||
38 | extern const char test_file_data[]; | ||
39 | |||
40 | extern const char ca_key_pem[]; | ||
41 | extern const char ca_cert_pem[]; | ||
42 | extern const char srv_signed_cert_pem[]; | 37 | extern const char srv_signed_cert_pem[]; |
43 | extern const char srv_signed_key_pem[]; | 38 | extern const char srv_signed_key_pem[]; |
44 | 39 | ||
@@ -51,6 +46,7 @@ test_secure_get (void * cls, char *cipher_suite, int proto_version) | |||
51 | int ret; | 46 | int ret; |
52 | struct MHD_Daemon *d; | 47 | struct MHD_Daemon *d; |
53 | int port; | 48 | int port; |
49 | (void)cls; /* Unused. Silent compiler warning. */ | ||
54 | 50 | ||
55 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 51 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
56 | port = 0; | 52 | port = 0; |
@@ -90,6 +86,7 @@ main (int argc, char *const *argv) | |||
90 | { | 86 | { |
91 | unsigned int errorCount = 0; | 87 | unsigned int errorCount = 0; |
92 | char *aes256_sha = "AES256-SHA"; | 88 | char *aes256_sha = "AES256-SHA"; |
89 | (void)argc; (void)argv; /* Unused. Silent compiler warning. */ | ||
93 | 90 | ||
94 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 91 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
95 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); | 92 | gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); |
diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c index 6eed7932..6d393bf2 100644 --- a/src/testcurl/https/test_tls_options.c +++ b/src/testcurl/https/test_tls_options.c | |||
@@ -47,6 +47,7 @@ test_unmatching_ssl_version (void * cls, int port, const char *cipher_suite, | |||
47 | int curl_req_ssl_version) | 47 | int curl_req_ssl_version) |
48 | { | 48 | { |
49 | struct CBC cbc; | 49 | struct CBC cbc; |
50 | (void)cls; /* Unused. Silent compiler warning. */ | ||
50 | if (NULL == (cbc.buf = malloc (sizeof (char) * 256))) | 51 | if (NULL == (cbc.buf = malloc (sizeof (char) * 256))) |
51 | { | 52 | { |
52 | fprintf (stderr, "Error: failed to allocate: %s\n", | 53 | fprintf (stderr, "Error: failed to allocate: %s\n", |
@@ -90,6 +91,7 @@ main (int argc, char *const *argv) | |||
90 | int daemon_flags = | 91 | int daemon_flags = |
91 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_ERROR_LOG; | 92 | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_ERROR_LOG; |
92 | int port; | 93 | int port; |
94 | (void)argc; (void)argv; /* Unused. Silent compiler warning. */ | ||
93 | 95 | ||
94 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 96 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
95 | port = 0; | 97 | port = 0; |
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index e929334b..54466a2a 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -73,6 +73,7 @@ test_daemon_get (void *cls, | |||
73 | CURLcode errornum; | 73 | CURLcode errornum; |
74 | char url[255]; | 74 | char url[255]; |
75 | size_t len; | 75 | size_t len; |
76 | (void)cls; /* Unused. Silent compiler warning. */ | ||
76 | 77 | ||
77 | len = strlen (test_data); | 78 | len = strlen (test_data); |
78 | if (NULL == (cbc.buf = malloc (sizeof (char) * len))) | 79 | if (NULL == (cbc.buf = malloc (sizeof (char) * len))) |
@@ -166,12 +167,14 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
166 | */ | 167 | */ |
167 | int | 168 | int |
168 | http_ahc (void *cls, struct MHD_Connection *connection, | 169 | http_ahc (void *cls, struct MHD_Connection *connection, |
169 | const char *url, const char *method, const char *upload_data, | 170 | const char *url, const char *method, const char *version, |
170 | const char *version, size_t *upload_data_size, void **ptr) | 171 | const char *upload_data, size_t *upload_data_size, void **ptr) |
171 | { | 172 | { |
172 | static int aptr; | 173 | static int aptr; |
173 | struct MHD_Response *response; | 174 | struct MHD_Response *response; |
174 | int ret; | 175 | int ret; |
176 | (void)cls;(void)url;(void)version; /* Unused. Silent compiler warning. */ | ||
177 | (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */ | ||
175 | 178 | ||
176 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 179 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
177 | return MHD_NO; /* unexpected method */ | 180 | return MHD_NO; /* unexpected method */ |
@@ -193,11 +196,13 @@ http_ahc (void *cls, struct MHD_Connection *connection, | |||
193 | /* HTTP access handler call back */ | 196 | /* HTTP access handler call back */ |
194 | int | 197 | int |
195 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, | 198 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, |
196 | const char *url, const char *method, const char *upload_data, | 199 | const char *url, const char *method, const char *version, |
197 | const char *version, size_t *upload_data_size, | 200 | const char *upload_data, size_t *upload_data_size, |
198 | void **ptr) | 201 | void **ptr) |
199 | { | 202 | { |
200 | return 0; | 203 | (void)cls;(void)connection;(void)url;(void)method;(void)version; /* Unused. Silent compiler warning. */ |
204 | (void)upload_data;(void)upload_data_size;(void)ptr; /* Unused. Silent compiler warning. */ | ||
205 | return 0; | ||
201 | } | 206 | } |
202 | 207 | ||
203 | /** | 208 | /** |
@@ -273,6 +278,7 @@ gen_test_file_url (char *url, | |||
273 | int ret = 0; | 278 | int ret = 0; |
274 | char *doc_path; | 279 | char *doc_path; |
275 | size_t doc_path_len; | 280 | size_t doc_path_len; |
281 | size_t i; | ||
276 | /* setup test file path, url */ | 282 | /* setup test file path, url */ |
277 | #ifdef PATH_MAX | 283 | #ifdef PATH_MAX |
278 | doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX; | 284 | doc_path_len = PATH_MAX > 4096 ? 4096 : PATH_MAX; |
@@ -293,7 +299,7 @@ gen_test_file_url (char *url, | |||
293 | return -1; | 299 | return -1; |
294 | } | 300 | } |
295 | #ifdef WINDOWS | 301 | #ifdef WINDOWS |
296 | for (int i = 0; i < doc_path_len; i++) | 302 | for (i = 0; i < doc_path_len; i++) |
297 | { | 303 | { |
298 | if (doc_path[i] == 0) | 304 | if (doc_path[i] == 0) |
299 | break; | 305 | break; |
@@ -316,7 +322,7 @@ gen_test_file_url (char *url, | |||
316 | "https://127.0.0.1", | 322 | "https://127.0.0.1", |
317 | port, | 323 | port, |
318 | doc_path, | 324 | doc_path, |
319 | "urlpath") >= url_len) | 325 | "urlpath") >= (long long)url_len) |
320 | ret = -1; | 326 | ret = -1; |
321 | 327 | ||
322 | free (doc_path); | 328 | free (doc_path); |
@@ -337,6 +343,7 @@ test_https_transfer (void *cls, | |||
337 | int ret = 0; | 343 | int ret = 0; |
338 | struct CBC cbc; | 344 | struct CBC cbc; |
339 | char url[255]; | 345 | char url[255]; |
346 | (void)cls; /* Unused. Silent compiler warning. */ | ||
340 | 347 | ||
341 | len = strlen (test_data); | 348 | len = strlen (test_data); |
342 | if (NULL == (cbc.buf = malloc (sizeof (char) * len))) | 349 | if (NULL == (cbc.buf = malloc (sizeof (char) * len))) |
@@ -490,6 +497,7 @@ test_wrap (const char *test_name, int | |||
490 | int ret; | 497 | int ret; |
491 | va_list arg_list; | 498 | va_list arg_list; |
492 | struct MHD_Daemon *d; | 499 | struct MHD_Daemon *d; |
500 | (void)cls; /* Unused. Silent compiler warning. */ | ||
493 | 501 | ||
494 | va_start (arg_list, proto_version); | 502 | va_start (arg_list, proto_version); |
495 | port = setup_testcase (&d, port, daemon_flags, arg_list); | 503 | port = setup_testcase (&d, port, daemon_flags, arg_list); |