diff options
Diffstat (limited to 'src/testcurl/perf_get.c')
-rw-r--r-- | src/testcurl/perf_get.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index a168205f..bcd5a21c 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -186,8 +186,8 @@ ahc_echo (void *cls, | |||
186 | } | 186 | } |
187 | 187 | ||
188 | 188 | ||
189 | static int | 189 | static unsigned int |
190 | testInternalGet (int port, int poll_flag) | 190 | testInternalGet (uint16_t port, uint32_t poll_flag) |
191 | { | 191 | { |
192 | struct MHD_Daemon *d; | 192 | struct MHD_Daemon *d; |
193 | CURL *c; | 193 | CURL *c; |
@@ -215,12 +215,12 @@ testInternalGet (int port, int poll_flag) | |||
215 | { | 215 | { |
216 | MHD_stop_daemon (d); return 32; | 216 | MHD_stop_daemon (d); return 32; |
217 | } | 217 | } |
218 | port = (int) dinfo->port; | 218 | port = dinfo->port; |
219 | } | 219 | } |
220 | snprintf (url, | 220 | snprintf (url, |
221 | sizeof (url), | 221 | sizeof (url), |
222 | "http://127.0.0.1:%d/hello_world", | 222 | "http://127.0.0.1:%u/hello_world", |
223 | port); | 223 | (unsigned int) port); |
224 | start_timer (); | 224 | start_timer (); |
225 | for (i = 0; i < ROUNDS; i++) | 225 | for (i = 0; i < ROUNDS; i++) |
226 | { | 226 | { |
@@ -264,8 +264,8 @@ testInternalGet (int port, int poll_flag) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | static int | 267 | static unsigned int |
268 | testMultithreadedGet (int port, int poll_flag) | 268 | testMultithreadedGet (uint16_t port, uint32_t poll_flag) |
269 | { | 269 | { |
270 | struct MHD_Daemon *d; | 270 | struct MHD_Daemon *d; |
271 | CURL *c; | 271 | CURL *c; |
@@ -294,12 +294,12 @@ testMultithreadedGet (int port, int poll_flag) | |||
294 | { | 294 | { |
295 | MHD_stop_daemon (d); return 32; | 295 | MHD_stop_daemon (d); return 32; |
296 | } | 296 | } |
297 | port = (int) dinfo->port; | 297 | port = dinfo->port; |
298 | } | 298 | } |
299 | snprintf (url, | 299 | snprintf (url, |
300 | sizeof (url), | 300 | sizeof (url), |
301 | "http://127.0.0.1:%d/hello_world", | 301 | "http://127.0.0.1:%u/hello_world", |
302 | port); | 302 | (unsigned int) port); |
303 | start_timer (); | 303 | start_timer (); |
304 | for (i = 0; i < ROUNDS; i++) | 304 | for (i = 0; i < ROUNDS; i++) |
305 | { | 305 | { |
@@ -346,8 +346,8 @@ testMultithreadedGet (int port, int poll_flag) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | 348 | ||
349 | static int | 349 | static unsigned int |
350 | testMultithreadedPoolGet (int port, int poll_flag) | 350 | testMultithreadedPoolGet (uint16_t port, uint32_t poll_flag) |
351 | { | 351 | { |
352 | struct MHD_Daemon *d; | 352 | struct MHD_Daemon *d; |
353 | CURL *c; | 353 | CURL *c; |
@@ -377,12 +377,12 @@ testMultithreadedPoolGet (int port, int poll_flag) | |||
377 | { | 377 | { |
378 | MHD_stop_daemon (d); return 32; | 378 | MHD_stop_daemon (d); return 32; |
379 | } | 379 | } |
380 | port = (int) dinfo->port; | 380 | port = dinfo->port; |
381 | } | 381 | } |
382 | snprintf (url, | 382 | snprintf (url, |
383 | sizeof (url), | 383 | sizeof (url), |
384 | "http://127.0.0.1:%d/hello_world", | 384 | "http://127.0.0.1:%u/hello_world", |
385 | port); | 385 | (unsigned int) port); |
386 | start_timer (); | 386 | start_timer (); |
387 | for (i = 0; i < ROUNDS; i++) | 387 | for (i = 0; i < ROUNDS; i++) |
388 | { | 388 | { |
@@ -426,8 +426,8 @@ testMultithreadedPoolGet (int port, int poll_flag) | |||
426 | } | 426 | } |
427 | 427 | ||
428 | 428 | ||
429 | static int | 429 | static unsigned int |
430 | testExternalGet (int port) | 430 | testExternalGet (uint16_t port) |
431 | { | 431 | { |
432 | struct MHD_Daemon *d; | 432 | struct MHD_Daemon *d; |
433 | CURL *c; | 433 | CURL *c; |
@@ -471,12 +471,12 @@ testExternalGet (int port) | |||
471 | { | 471 | { |
472 | MHD_stop_daemon (d); return 32; | 472 | MHD_stop_daemon (d); return 32; |
473 | } | 473 | } |
474 | port = (int) dinfo->port; | 474 | port = dinfo->port; |
475 | } | 475 | } |
476 | snprintf (url, | 476 | snprintf (url, |
477 | sizeof (url), | 477 | sizeof (url), |
478 | "http://127.0.0.1:%d/hello_world", | 478 | "http://127.0.0.1:%u/hello_world", |
479 | port); | 479 | (unsigned int) port); |
480 | start_timer (); | 480 | start_timer (); |
481 | multi = curl_multi_init (); | 481 | multi = curl_multi_init (); |
482 | if (multi == NULL) | 482 | if (multi == NULL) |
@@ -628,7 +628,7 @@ int | |||
628 | main (int argc, char *const *argv) | 628 | main (int argc, char *const *argv) |
629 | { | 629 | { |
630 | unsigned int errorCount = 0; | 630 | unsigned int errorCount = 0; |
631 | int port = 1130; | 631 | uint16_t port = 1130; |
632 | (void) argc; /* Unused. Silent compiler warning. */ | 632 | (void) argc; /* Unused. Silent compiler warning. */ |
633 | 633 | ||
634 | if ((NULL == argv) || (0 == argv[0])) | 634 | if ((NULL == argv) || (0 == argv[0])) |