aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_postprocessor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_postprocessor.c')
-rw-r--r--src/microhttpd/test_postprocessor.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c
index ab68541b..50dfd534 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -416,19 +416,19 @@ test_multipart_garbage (void)
416 if (MHD_YES != MHD_post_process (pp, &xdata[splitpoint], size - splitpoint)) 416 if (MHD_YES != MHD_post_process (pp, &xdata[splitpoint], size - splitpoint))
417 { 417 {
418 fprintf (stderr, 418 fprintf (stderr,
419 "Test failed in line %u at point %d\n", 419 "Test failed in line %u at point %u\n",
420 (unsigned int) __LINE__, 420 (unsigned int) __LINE__,
421 (int) splitpoint); 421 (unsigned int) splitpoint);
422 exit (49); 422 exit (49);
423 } 423 }
424 MHD_destroy_post_processor (pp); 424 MHD_destroy_post_processor (pp);
425 if (want_off != FORM_END) 425 if (want_off != FORM_END)
426 { 426 {
427 fprintf (stderr, 427 fprintf (stderr,
428 "Test failed in line %u at point %d\n", 428 "Test failed in line %u at point %u\n",
429 (unsigned int) __LINE__, 429 (unsigned int) __LINE__,
430 (int) splitpoint); 430 (unsigned int) splitpoint);
431 return (int) splitpoint; 431 return (unsigned int) splitpoint;
432 } 432 }
433 } 433 }
434 return 0; 434 return 0;
@@ -478,19 +478,19 @@ test_multipart_splits (void)
478 size - splitpoint)) 478 size - splitpoint))
479 { 479 {
480 fprintf (stderr, 480 fprintf (stderr,
481 "Test failed in line %u at point %d\n", 481 "Test failed in line %u at point %u\n",
482 (unsigned int) __LINE__, 482 (unsigned int) __LINE__,
483 (int) splitpoint); 483 (unsigned int) splitpoint);
484 exit (49); 484 exit (49);
485 } 485 }
486 MHD_destroy_post_processor (pp); 486 MHD_destroy_post_processor (pp);
487 if (want_off != FORM_END) 487 if (want_off != FORM_END)
488 { 488 {
489 fprintf (stderr, 489 fprintf (stderr,
490 "Test failed in line %u at point %d\n", 490 "Test failed in line %u at point %u\n",
491 (unsigned int) __LINE__, 491 (unsigned int) __LINE__,
492 (int) splitpoint); 492 (unsigned int) splitpoint);
493 return (int) splitpoint; 493 return (unsigned int) splitpoint;
494 } 494 }
495 } 495 }
496 return 0; 496 return 0;
@@ -529,7 +529,7 @@ test_multipart (void)
529 size = strlen (FORM_DATA); 529 size = strlen (FORM_DATA);
530 while (i < size) 530 while (i < size)
531 { 531 {
532 delta = 1 + MHD_random_ () % (size - i); 532 delta = 1 + ((size_t) MHD_random_ ()) % (size - i);
533 if (MHD_YES != MHD_post_process (pp, 533 if (MHD_YES != MHD_post_process (pp,
534 &FORM_DATA[i], 534 &FORM_DATA[i],
535 delta)) 535 delta))
@@ -586,7 +586,7 @@ test_nested_multipart (void)
586 size = strlen (FORM_NESTED_DATA); 586 size = strlen (FORM_NESTED_DATA);
587 while (i < size) 587 while (i < size)
588 { 588 {
589 delta = 1 + MHD_random_ () % (size - i); 589 delta = 1 + ((size_t) MHD_random_ ()) % (size - i);
590 if (MHD_YES != MHD_post_process (pp, 590 if (MHD_YES != MHD_post_process (pp,
591 &FORM_NESTED_DATA[i], 591 &FORM_NESTED_DATA[i],
592 delta)) 592 delta))
@@ -665,7 +665,7 @@ test_overflow (void)
665 return 1; 665 return 1;
666 memset (buf, 'A', i); 666 memset (buf, 'A', i);
667 buf[i / 2] = '='; 667 buf[i / 2] = '=';
668 delta = 1 + (MHD_random_ () % (i - 1)); 668 delta = 1 + (((size_t) MHD_random_ ()) % (i - 1));
669 j = 0; 669 j = 0;
670 while (j < i) 670 while (j < i)
671 { 671 {