diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-07-25 10:07:38 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-07-25 16:20:50 +0300 |
commit | 0194db857cb96909d833435d2aa05f076efdcabb (patch) | |
tree | 95271926f3fe938dda765dbe4a908da42e443312 | |
parent | 99c44002a9bebc6abe6223133e1b67434daf6763 (diff) | |
download | libmicrohttpd-0194db857cb96909d833435d2aa05f076efdcabb.tar.gz libmicrohttpd-0194db857cb96909d833435d2aa05f076efdcabb.zip |
test_digestauth_concurrent: fixed compiler warnings
-rw-r--r-- | src/testcurl/test_digestauth_concurrent.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testcurl/test_digestauth_concurrent.c b/src/testcurl/test_digestauth_concurrent.c index fed39add..9a2f6227 100644 --- a/src/testcurl/test_digestauth_concurrent.c +++ b/src/testcurl/test_digestauth_concurrent.c | |||
@@ -348,7 +348,7 @@ ahc_echo (void *cls, | |||
348 | 348 | ||
349 | 349 | ||
350 | static CURL * | 350 | static CURL * |
351 | setupCURL (void *cbc, int port, char *errbuf) | 351 | setupCURL (void *cbc, uint16_t port, char *errbuf) |
352 | { | 352 | { |
353 | CURL *c; | 353 | CURL *c; |
354 | char url[512]; | 354 | char url[512]; |
@@ -359,7 +359,7 @@ setupCURL (void *cbc, int port, char *errbuf) | |||
359 | /* A workaround for some old libcurl versions, which ignore the specified | 359 | /* A workaround for some old libcurl versions, which ignore the specified |
360 | * port by CURLOPT_PORT when digest authorisation is used. */ | 360 | * port by CURLOPT_PORT when digest authorisation is used. */ |
361 | res = snprintf (url, (sizeof(url) / sizeof(url[0])), | 361 | res = snprintf (url, (sizeof(url) / sizeof(url[0])), |
362 | "http://127.0.0.1:%d%s", port, MHD_URI_BASE_PATH); | 362 | "http://127.0.0.1:%d%s", (int) port, MHD_URI_BASE_PATH); |
363 | if ((0 >= res) || ((sizeof(url) / sizeof(url[0])) <= (size_t) res)) | 363 | if ((0 >= res) || ((sizeof(url) / sizeof(url[0])) <= (size_t) res)) |
364 | externalErrorExitDesc ("Cannot form request URL"); | 364 | externalErrorExitDesc ("Cannot form request URL"); |
365 | } | 365 | } |
@@ -455,7 +455,7 @@ struct curlWokerInfo | |||
455 | /** | 455 | /** |
456 | * The number of successful worker results | 456 | * The number of successful worker results |
457 | */ | 457 | */ |
458 | volatile int success; | 458 | volatile unsigned int success; |
459 | }; | 459 | }; |
460 | 460 | ||
461 | 461 | ||
@@ -552,17 +552,17 @@ worker_func (void *param) | |||
552 | 552 | ||
553 | #define CLIENT_BUF_SIZE 2048 | 553 | #define CLIENT_BUF_SIZE 2048 |
554 | 554 | ||
555 | static int | 555 | static unsigned int |
556 | testDigestAuth (void) | 556 | testDigestAuth (void) |
557 | { | 557 | { |
558 | struct MHD_Daemon *d; | 558 | struct MHD_Daemon *d; |
559 | char rnd[8]; | 559 | char rnd[8]; |
560 | int port; | 560 | uint16_t port; |
561 | size_t i; | 561 | size_t i; |
562 | /* Run three workers in parallel so at least two workers would start within | 562 | /* Run three workers in parallel so at least two workers would start within |
563 | * the same monotonic clock second.*/ | 563 | * the same monotonic clock second.*/ |
564 | struct curlWokerInfo workers[3]; | 564 | struct curlWokerInfo workers[3]; |
565 | int ret; | 565 | unsigned int ret; |
566 | 566 | ||
567 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 567 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
568 | port = 0; | 568 | port = 0; |
@@ -573,7 +573,7 @@ testDigestAuth (void) | |||
573 | 573 | ||
574 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 574 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
575 | port, NULL, NULL, | 575 | port, NULL, NULL, |
576 | &ahc_echo, PAGE, | 576 | &ahc_echo, NULL, |
577 | MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd, | 577 | MHD_OPTION_DIGEST_AUTH_RANDOM, sizeof (rnd), rnd, |
578 | MHD_OPTION_NONCE_NC_SIZE, 300, | 578 | MHD_OPTION_NONCE_NC_SIZE, 300, |
579 | MHD_OPTION_THREAD_POOL_SIZE, | 579 | MHD_OPTION_THREAD_POOL_SIZE, |
@@ -590,7 +590,7 @@ testDigestAuth (void) | |||
590 | if ( (NULL == dinfo) || | 590 | if ( (NULL == dinfo) || |
591 | (0 == dinfo->port) ) | 591 | (0 == dinfo->port) ) |
592 | mhdErrorExitDesc ("MHD_get_daemon_info() failed"); | 592 | mhdErrorExitDesc ("MHD_get_daemon_info() failed"); |
593 | port = (int) dinfo->port; | 593 | port = dinfo->port; |
594 | } | 594 | } |
595 | 595 | ||
596 | /* Initialise all workers */ | 596 | /* Initialise all workers */ |