From 023e1dba2a6a8b3710613aa84d6253a62038cdad Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Fri, 30 Sep 2022 15:46:23 +0300 Subject: testcurl: fixed used types and related warnings --- src/testcurl/test_long_header.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/testcurl/test_long_header.c') diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c index c1d07cb3..6ed8d78d 100644 --- a/src/testcurl/test_long_header.c +++ b/src/testcurl/test_long_header.c @@ -96,7 +96,7 @@ ahc_echo (void *cls, } -static int +static unsigned int testLongUrlGet (size_t buff_size) { struct MHD_Daemon *d; @@ -105,13 +105,13 @@ testLongUrlGet (size_t buff_size) struct CBC cbc; char *url; long code; - int port; + uint16_t port; if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) port = 0; else { - port = 1330 + buff_size % 20; + port = 1330 + (uint16_t) (buff_size % 20); if (oneone) port += 5; } @@ -136,7 +136,7 @@ testLongUrlGet (size_t buff_size) { MHD_stop_daemon (d); return 32; } - port = (int) dinfo->port; + port = dinfo->port; } c = curl_easy_init (); url = malloc (VERY_LONG); @@ -187,7 +187,7 @@ testLongUrlGet (size_t buff_size) } -static int +static unsigned int testLongHeaderGet (size_t buff_size) { struct MHD_Daemon *d; @@ -197,13 +197,13 @@ testLongHeaderGet (size_t buff_size) char *url; long code; struct curl_slist *header = NULL; - int port; + uint16_t port; if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) port = 0; else { - port = 1331 + buff_size % 20; + port = 1331 + (uint16_t) (buff_size % 20); if (oneone) port += 5; } @@ -229,7 +229,7 @@ testLongHeaderGet (size_t buff_size) { MHD_stop_daemon (d); return 32; } - port = (int) dinfo->port; + port = dinfo->port; } c = curl_easy_init (); url = malloc (VERY_LONG); -- cgit v1.2.3