aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_long_header.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-09-30 15:46:23 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-10-01 15:07:36 +0300
commit023e1dba2a6a8b3710613aa84d6253a62038cdad (patch)
tree0a3c2c1e23a97edb6fd585b45f188db10b2deb99 /src/testcurl/test_long_header.c
parent81733d43e89dde0e69f6657d85aca9500563d44b (diff)
downloadlibmicrohttpd-023e1dba2a6a8b3710613aa84d6253a62038cdad.tar.gz
libmicrohttpd-023e1dba2a6a8b3710613aa84d6253a62038cdad.zip
testcurl: fixed used types and related warnings
Diffstat (limited to 'src/testcurl/test_long_header.c')
-rw-r--r--src/testcurl/test_long_header.c16
1 files changed, 8 insertions, 8 deletions
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,
96} 96}
97 97
98 98
99static int 99static unsigned int
100testLongUrlGet (size_t buff_size) 100testLongUrlGet (size_t buff_size)
101{ 101{
102 struct MHD_Daemon *d; 102 struct MHD_Daemon *d;
@@ -105,13 +105,13 @@ testLongUrlGet (size_t buff_size)
105 struct CBC cbc; 105 struct CBC cbc;
106 char *url; 106 char *url;
107 long code; 107 long code;
108 int port; 108 uint16_t port;
109 109
110 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 110 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
111 port = 0; 111 port = 0;
112 else 112 else
113 { 113 {
114 port = 1330 + buff_size % 20; 114 port = 1330 + (uint16_t) (buff_size % 20);
115 if (oneone) 115 if (oneone)
116 port += 5; 116 port += 5;
117 } 117 }
@@ -136,7 +136,7 @@ testLongUrlGet (size_t buff_size)
136 { 136 {
137 MHD_stop_daemon (d); return 32; 137 MHD_stop_daemon (d); return 32;
138 } 138 }
139 port = (int) dinfo->port; 139 port = dinfo->port;
140 } 140 }
141 c = curl_easy_init (); 141 c = curl_easy_init ();
142 url = malloc (VERY_LONG); 142 url = malloc (VERY_LONG);
@@ -187,7 +187,7 @@ testLongUrlGet (size_t buff_size)
187} 187}
188 188
189 189
190static int 190static unsigned int
191testLongHeaderGet (size_t buff_size) 191testLongHeaderGet (size_t buff_size)
192{ 192{
193 struct MHD_Daemon *d; 193 struct MHD_Daemon *d;
@@ -197,13 +197,13 @@ testLongHeaderGet (size_t buff_size)
197 char *url; 197 char *url;
198 long code; 198 long code;
199 struct curl_slist *header = NULL; 199 struct curl_slist *header = NULL;
200 int port; 200 uint16_t port;
201 201
202 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 202 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
203 port = 0; 203 port = 0;
204 else 204 else
205 { 205 {
206 port = 1331 + buff_size % 20; 206 port = 1331 + (uint16_t) (buff_size % 20);
207 if (oneone) 207 if (oneone)
208 port += 5; 208 port += 5;
209 } 209 }
@@ -229,7 +229,7 @@ testLongHeaderGet (size_t buff_size)
229 { 229 {
230 MHD_stop_daemon (d); return 32; 230 MHD_stop_daemon (d); return 32;
231 } 231 }
232 port = (int) dinfo->port; 232 port = dinfo->port;
233 } 233 }
234 c = curl_easy_init (); 234 c = curl_easy_init ();
235 url = malloc (VERY_LONG); 235 url = malloc (VERY_LONG);