diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-10-31 11:15:07 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-10-31 11:18:18 +0300 |
commit | e7f77103503632ddd6ee6e87021de83271e9ebbf (patch) | |
tree | 368e8ba3ea17161d7bd6bed97c4cd9fb4d6e4cbb /src/testzzuf | |
parent | 28f723b238181f10f3bd86de84a4c4621e62a712 (diff) | |
download | libmicrohttpd-e7f77103503632ddd6ee6e87021de83271e9ebbf.tar.gz libmicrohttpd-e7f77103503632ddd6ee6e87021de83271e9ebbf.zip |
Silenced compiler warnings in src/testczzuf.
Diffstat (limited to 'src/testzzuf')
-rw-r--r-- | src/testzzuf/test_get.c | 2 | ||||
-rw-r--r-- | src/testzzuf/test_get_chunked.c | 3 | ||||
-rw-r--r-- | src/testzzuf/test_long_header.c | 5 | ||||
-rw-r--r-- | src/testzzuf/test_post.c | 5 | ||||
-rw-r--r-- | src/testzzuf/test_post_form.c | 5 | ||||
-rw-r--r-- | src/testzzuf/test_put.c | 2 | ||||
-rw-r--r-- | src/testzzuf/test_put_chunked.c | 2 | ||||
-rw-r--r-- | src/testzzuf/test_put_large.c | 2 |
8 files changed, 26 insertions, 0 deletions
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c index 3ae2e89e..503aee44 100644 --- a/src/testzzuf/test_get.c +++ b/src/testzzuf/test_get.c | |||
@@ -72,6 +72,7 @@ ahc_echo (void *cls, | |||
72 | const char *me = cls; | 72 | const char *me = cls; |
73 | struct MHD_Response *response; | 73 | struct MHD_Response *response; |
74 | int ret; | 74 | int ret; |
75 | (void)version;(void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */ | ||
75 | 76 | ||
76 | if (0 != strcmp (me, method)) | 77 | if (0 != strcmp (me, method)) |
77 | return MHD_NO; /* unexpected method */ | 78 | return MHD_NO; /* unexpected method */ |
@@ -299,6 +300,7 @@ int | |||
299 | main (int argc, char *const *argv) | 300 | main (int argc, char *const *argv) |
300 | { | 301 | { |
301 | unsigned int errorCount = 0; | 302 | unsigned int errorCount = 0; |
303 | (void)argc; /* Unused. Silent compiler warning. */ | ||
302 | 304 | ||
303 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 305 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
304 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 306 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c index fecc71ce..3e274e7f 100644 --- a/src/testzzuf/test_get_chunked.c +++ b/src/testzzuf/test_get_chunked.c | |||
@@ -99,6 +99,8 @@ ahc_echo (void *cls, | |||
99 | struct MHD_Response *response; | 99 | struct MHD_Response *response; |
100 | struct MHD_Response **responseptr; | 100 | struct MHD_Response **responseptr; |
101 | int ret; | 101 | int ret; |
102 | (void)url;(void)version; /* Unused. Silent compiler warning. */ | ||
103 | (void)upload_data;(void)upload_data_size; /* Unused. Silent compiler warning. */ | ||
102 | 104 | ||
103 | if (0 != strcmp (me, method)) | 105 | if (0 != strcmp (me, method)) |
104 | return MHD_NO; /* unexpected method */ | 106 | return MHD_NO; /* unexpected method */ |
@@ -317,6 +319,7 @@ int | |||
317 | main (int argc, char *const *argv) | 319 | main (int argc, char *const *argv) |
318 | { | 320 | { |
319 | unsigned int errorCount = 0; | 321 | unsigned int errorCount = 0; |
322 | (void)argc; (void)argv; /* Unused. Silent compiler warning. */ | ||
320 | 323 | ||
321 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 324 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
322 | return 2; | 325 | return 2; |
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c index 6e3f15bf..26932ea0 100644 --- a/src/testzzuf/test_long_header.c +++ b/src/testzzuf/test_long_header.c | |||
@@ -50,6 +50,7 @@ static int oneone; | |||
50 | static int | 50 | static int |
51 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) | 51 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) |
52 | { | 52 | { |
53 | (void)cls;(void)addr;(void)addrlen; /* Unused. Silent compiler warning. */ | ||
53 | return MHD_YES; | 54 | return MHD_YES; |
54 | } | 55 | } |
55 | 56 | ||
@@ -63,6 +64,7 @@ struct CBC | |||
63 | static size_t | 64 | static size_t |
64 | copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | 65 | copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) |
65 | { | 66 | { |
67 | (void)ptr;(void)ctx; /* Unused. Silent compiler warning. */ | ||
66 | return size * nmemb; | 68 | return size * nmemb; |
67 | } | 69 | } |
68 | 70 | ||
@@ -78,6 +80,8 @@ ahc_echo (void *cls, | |||
78 | const char *me = cls; | 80 | const char *me = cls; |
79 | struct MHD_Response *response; | 81 | struct MHD_Response *response; |
80 | int ret; | 82 | int ret; |
83 | (void)version;(void)upload_data; /* Unused. Silent compiler warning. */ | ||
84 | (void)upload_data_size;(void)unused; /* Unused. Silent compiler warning. */ | ||
81 | 85 | ||
82 | if (0 != strcmp (me, method)) | 86 | if (0 != strcmp (me, method)) |
83 | return MHD_NO; /* unexpected method */ | 87 | return MHD_NO; /* unexpected method */ |
@@ -220,6 +224,7 @@ int | |||
220 | main (int argc, char *const *argv) | 224 | main (int argc, char *const *argv) |
221 | { | 225 | { |
222 | unsigned int errorCount = 0; | 226 | unsigned int errorCount = 0; |
227 | (void)argc; /* Unused. Silent compiler warning. */ | ||
223 | 228 | ||
224 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 229 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
225 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 230 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c index b91de32b..51e67593 100644 --- a/src/testzzuf/test_post.c +++ b/src/testzzuf/test_post.c | |||
@@ -58,6 +58,7 @@ completed_cb (void *cls, | |||
58 | enum MHD_RequestTerminationCode toe) | 58 | enum MHD_RequestTerminationCode toe) |
59 | { | 59 | { |
60 | struct MHD_PostProcessor *pp = *con_cls; | 60 | struct MHD_PostProcessor *pp = *con_cls; |
61 | (void)cls;(void)connection;(void)toe; /* Unused. Silent compiler warning. */ | ||
61 | 62 | ||
62 | if (NULL != pp) | 63 | if (NULL != pp) |
63 | MHD_destroy_post_processor (pp); | 64 | MHD_destroy_post_processor (pp); |
@@ -93,6 +94,8 @@ post_iterator (void *cls, | |||
93 | const char *value, uint64_t off, size_t size) | 94 | const char *value, uint64_t off, size_t size) |
94 | { | 95 | { |
95 | int *eok = cls; | 96 | int *eok = cls; |
97 | (void)kind;(void)filename;(void)content_type; /* Unused. Silent compiler warning. */ | ||
98 | (void)transfer_encoding;(void)off; /* Unused. Silent compiler warning. */ | ||
96 | 99 | ||
97 | if ((0 == strcmp (key, "name")) && | 100 | if ((0 == strcmp (key, "name")) && |
98 | (size == strlen ("daniel")) && (0 == strncmp (value, "daniel", size))) | 101 | (size == strlen ("daniel")) && (0 == strncmp (value, "daniel", size))) |
@@ -116,6 +119,7 @@ ahc_echo (void *cls, | |||
116 | struct MHD_Response *response; | 119 | struct MHD_Response *response; |
117 | struct MHD_PostProcessor *pp; | 120 | struct MHD_PostProcessor *pp; |
118 | int ret; | 121 | int ret; |
122 | (void)cls;(void)version; /* Unused. Silent compiler warning. */ | ||
119 | 123 | ||
120 | if (0 != strcmp ("POST", method)) | 124 | if (0 != strcmp ("POST", method)) |
121 | { | 125 | { |
@@ -379,6 +383,7 @@ int | |||
379 | main (int argc, char *const *argv) | 383 | main (int argc, char *const *argv) |
380 | { | 384 | { |
381 | unsigned int errorCount = 0; | 385 | unsigned int errorCount = 0; |
386 | (void)argc; /* Unused. Silent compiler warning. */ | ||
382 | 387 | ||
383 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 388 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
384 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 389 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c index dbf22b9c..60b0fe35 100644 --- a/src/testzzuf/test_post_form.c +++ b/src/testzzuf/test_post_form.c | |||
@@ -56,6 +56,7 @@ completed_cb (void *cls, | |||
56 | enum MHD_RequestTerminationCode toe) | 56 | enum MHD_RequestTerminationCode toe) |
57 | { | 57 | { |
58 | struct MHD_PostProcessor *pp = *con_cls; | 58 | struct MHD_PostProcessor *pp = *con_cls; |
59 | (void)cls;(void)connection;(void)toe; /* Unused. Silent compiler warning. */ | ||
59 | 60 | ||
60 | if (NULL != pp) | 61 | if (NULL != pp) |
61 | MHD_destroy_post_processor (pp); | 62 | MHD_destroy_post_processor (pp); |
@@ -90,6 +91,8 @@ post_iterator (void *cls, | |||
90 | const char *value, uint64_t off, size_t size) | 91 | const char *value, uint64_t off, size_t size) |
91 | { | 92 | { |
92 | int *eok = cls; | 93 | int *eok = cls; |
94 | (void)kind;(void)filename;(void)content_type; /* Unused. Silent compiler warning. */ | ||
95 | (void)transfer_encoding;(void)off; /* Unused. Silent compiler warning. */ | ||
93 | 96 | ||
94 | if (key == NULL) | 97 | if (key == NULL) |
95 | return MHD_YES; | 98 | return MHD_YES; |
@@ -119,6 +122,7 @@ ahc_echo (void *cls, | |||
119 | struct MHD_Response *response; | 122 | struct MHD_Response *response; |
120 | struct MHD_PostProcessor *pp; | 123 | struct MHD_PostProcessor *pp; |
121 | int ret; | 124 | int ret; |
125 | (void)cls;(void)version; /* Unused. Silent compiler warning. */ | ||
122 | 126 | ||
123 | if (0 != strcmp ("POST", method)) | 127 | if (0 != strcmp ("POST", method)) |
124 | { | 128 | { |
@@ -395,6 +399,7 @@ int | |||
395 | main (int argc, char *const *argv) | 399 | main (int argc, char *const *argv) |
396 | { | 400 | { |
397 | unsigned int errorCount = 0; | 401 | unsigned int errorCount = 0; |
402 | (void)argc; /* Unused. Silent compiler warning. */ | ||
398 | 403 | ||
399 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 404 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
400 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 405 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c index f76cde58..cc02b5c1 100644 --- a/src/testzzuf/test_put.c +++ b/src/testzzuf/test_put.c | |||
@@ -86,6 +86,7 @@ ahc_echo (void *cls, | |||
86 | int *done = cls; | 86 | int *done = cls; |
87 | struct MHD_Response *response; | 87 | struct MHD_Response *response; |
88 | int ret; | 88 | int ret; |
89 | (void)version;(void)unused; /* Unused. Silent compiler warning. */ | ||
89 | 90 | ||
90 | if (0 != strcmp ("PUT", method)) | 91 | if (0 != strcmp ("PUT", method)) |
91 | return MHD_NO; /* unexpected method */ | 92 | return MHD_NO; /* unexpected method */ |
@@ -346,6 +347,7 @@ int | |||
346 | main (int argc, char *const *argv) | 347 | main (int argc, char *const *argv) |
347 | { | 348 | { |
348 | unsigned int errorCount = 0; | 349 | unsigned int errorCount = 0; |
350 | (void)argc; /* Unused. Silent compiler warning. */ | ||
349 | 351 | ||
350 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 352 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
351 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 353 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c index a1527599..87d7f7e8 100644 --- a/src/testzzuf/test_put_chunked.c +++ b/src/testzzuf/test_put_chunked.c | |||
@@ -87,6 +87,7 @@ ahc_echo (void *cls, | |||
87 | struct MHD_Response *response; | 87 | struct MHD_Response *response; |
88 | int ret; | 88 | int ret; |
89 | int have; | 89 | int have; |
90 | (void)version;(void)unused; /* Unused. Silent compiler warning. */ | ||
90 | 91 | ||
91 | if (0 != strcmp ("PUT", method)) | 92 | if (0 != strcmp ("PUT", method)) |
92 | return MHD_NO; /* unexpected method */ | 93 | return MHD_NO; /* unexpected method */ |
@@ -358,6 +359,7 @@ int | |||
358 | main (int argc, char *const *argv) | 359 | main (int argc, char *const *argv) |
359 | { | 360 | { |
360 | unsigned int errorCount = 0; | 361 | unsigned int errorCount = 0; |
362 | (void)argc; (void)argv; /* Unused. Silent compiler warning. */ | ||
361 | 363 | ||
362 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 364 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
363 | return 2; | 365 | return 2; |
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c index af0d1706..d52e7b91 100644 --- a/src/testzzuf/test_put_large.c +++ b/src/testzzuf/test_put_large.c | |||
@@ -94,6 +94,7 @@ ahc_echo (void *cls, | |||
94 | int *done = cls; | 94 | int *done = cls; |
95 | struct MHD_Response *response; | 95 | struct MHD_Response *response; |
96 | int ret; | 96 | int ret; |
97 | (void)version;(void)unused; /* Unused. Silent compiler warning. */ | ||
97 | 98 | ||
98 | if (0 != strcmp ("PUT", method)) | 99 | if (0 != strcmp ("PUT", method)) |
99 | return MHD_NO; /* unexpected method */ | 100 | return MHD_NO; /* unexpected method */ |
@@ -364,6 +365,7 @@ int | |||
364 | main (int argc, char *const *argv) | 365 | main (int argc, char *const *argv) |
365 | { | 366 | { |
366 | unsigned int errorCount = 0; | 367 | unsigned int errorCount = 0; |
368 | (void)argc; /* Unused. Silent compiler warning. */ | ||
367 | 369 | ||
368 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? | 370 | oneone = (NULL != strrchr (argv[0], (int) '/')) ? |
369 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; | 371 | (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; |