diff options
Diffstat (limited to 'src/testcurl/test_concurrent_stop.c')
-rw-r--r-- | src/testcurl/test_concurrent_stop.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index 80b49ed7..dec0d269 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -216,12 +216,12 @@ do_gets (void *param) | |||
216 | int j; | 216 | int j; |
217 | pthread_t par[PAR]; | 217 | pthread_t par[PAR]; |
218 | char url[64]; | 218 | char url[64]; |
219 | int port = (int) (intptr_t) param; | 219 | uint16_t port = (uint16_t) (intptr_t) param; |
220 | 220 | ||
221 | snprintf (url, | 221 | snprintf (url, |
222 | sizeof (url), | 222 | sizeof (url), |
223 | "http://127.0.0.1:%d/hello_world", | 223 | "http://127.0.0.1:%u/hello_world", |
224 | port); | 224 | (unsigned int) port); |
225 | 225 | ||
226 | for (j = 0; j < PAR; j++) | 226 | for (j = 0; j < PAR; j++) |
227 | { | 227 | { |
@@ -246,7 +246,7 @@ do_gets (void *param) | |||
246 | 246 | ||
247 | 247 | ||
248 | static pthread_t | 248 | static pthread_t |
249 | start_gets (int port) | 249 | start_gets (uint16_t port) |
250 | { | 250 | { |
251 | pthread_t tid; | 251 | pthread_t tid; |
252 | continue_requesting = 1; | 252 | continue_requesting = 1; |
@@ -259,18 +259,18 @@ start_gets (int port) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | static int | 262 | static unsigned int |
263 | testMultithreadedGet (int port, | 263 | testMultithreadedGet (uint16_t port, |
264 | int poll_flag) | 264 | uint32_t poll_flag) |
265 | { | 265 | { |
266 | struct MHD_Daemon *d; | 266 | struct MHD_Daemon *d; |
267 | pthread_t p; | 267 | pthread_t p; |
268 | int result; | 268 | unsigned int result; |
269 | 269 | ||
270 | result = 0; | 270 | result = 0; |
271 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 271 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION |
272 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 272 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
273 | | poll_flag, | 273 | | (enum MHD_FLAG) poll_flag, |
274 | port, | 274 | port, |
275 | NULL, NULL, | 275 | NULL, NULL, |
276 | &ahc_echo, NULL, | 276 | &ahc_echo, NULL, |
@@ -285,7 +285,7 @@ testMultithreadedGet (int port, | |||
285 | { | 285 | { |
286 | MHD_stop_daemon (d); return 32; | 286 | MHD_stop_daemon (d); return 32; |
287 | } | 287 | } |
288 | port = (int) dinfo->port; | 288 | port = dinfo->port; |
289 | } | 289 | } |
290 | client_error = CURLE_OK; /* clear client error state */ | 290 | client_error = CURLE_OK; /* clear client error state */ |
291 | p = start_gets (port); | 291 | p = start_gets (port); |
@@ -305,17 +305,17 @@ testMultithreadedGet (int port, | |||
305 | } | 305 | } |
306 | 306 | ||
307 | 307 | ||
308 | static int | 308 | static unsigned int |
309 | testMultithreadedPoolGet (int port, | 309 | testMultithreadedPoolGet (uint16_t port, |
310 | int poll_flag) | 310 | uint32_t poll_flag) |
311 | { | 311 | { |
312 | struct MHD_Daemon *d; | 312 | struct MHD_Daemon *d; |
313 | pthread_t p; | 313 | pthread_t p; |
314 | int result; | 314 | unsigned int result; |
315 | 315 | ||
316 | result = 0; | 316 | result = 0; |
317 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 317 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
318 | | poll_flag, | 318 | | (enum MHD_FLAG) poll_flag, |
319 | port, | 319 | port, |
320 | NULL, NULL, | 320 | NULL, NULL, |
321 | &ahc_echo, NULL, | 321 | &ahc_echo, NULL, |
@@ -331,7 +331,7 @@ testMultithreadedPoolGet (int port, | |||
331 | { | 331 | { |
332 | MHD_stop_daemon (d); return 32; | 332 | MHD_stop_daemon (d); return 32; |
333 | } | 333 | } |
334 | port = (int) dinfo->port; | 334 | port = dinfo->port; |
335 | } | 335 | } |
336 | client_error = CURLE_OK; /* clear client error state */ | 336 | client_error = CURLE_OK; /* clear client error state */ |
337 | p = start_gets (port); | 337 | p = start_gets (port); |
@@ -355,7 +355,7 @@ int | |||
355 | main (int argc, char *const *argv) | 355 | main (int argc, char *const *argv) |
356 | { | 356 | { |
357 | unsigned int errorCount = 0; | 357 | unsigned int errorCount = 0; |
358 | int port; | 358 | uint16_t port; |
359 | (void) argc; /* Unused. Silent compiler warning. */ | 359 | (void) argc; /* Unused. Silent compiler warning. */ |
360 | (void) argv; /* Unused. Silent compiler warning. */ | 360 | (void) argv; /* Unused. Silent compiler warning. */ |
361 | 361 | ||