diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-13 21:24:51 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-13 21:24:51 +0300 |
commit | 9f805215338dd421d55aa8f51596359696562a0e (patch) | |
tree | 5d640c368cc0877587d814777c08bd0a07a67697 /src/microhttpd | |
parent | 11c6f7a6ed082142ccb97ad779b4c8a775e3ab30 (diff) | |
download | libmicrohttpd-9f805215338dd421d55aa8f51596359696562a0e.tar.gz libmicrohttpd-9f805215338dd421d55aa8f51596359696562a0e.zip |
test_postprocessor{,_amp,_large}: fixed compiler warnings, fixed extra-long strings
Diffstat (limited to 'src/microhttpd')
-rw-r--r-- | src/microhttpd/test_postprocessor.c | 38 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor_amp.c | 47 | ||||
-rw-r--r-- | src/microhttpd/test_postprocessor_large.c | 6 |
3 files changed, 72 insertions, 19 deletions
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c index 9a5977bc..ab68541b 100644 --- a/src/microhttpd/test_postprocessor.c +++ b/src/microhttpd/test_postprocessor.c | |||
@@ -87,14 +87,24 @@ struct expResult exp_results[] = { | |||
87 | #define URL_ENC_END (URL_ENC_START + 4) | 87 | #define URL_ENC_END (URL_ENC_START + 4) |
88 | {NULL, NULL, NULL, NULL, NULL}, | 88 | {NULL, NULL, NULL, NULL, NULL}, |
89 | #define FORM_DATA \ | 89 | #define FORM_DATA \ |
90 | "--AaB03x\r\ncontent-disposition: form-data; name=\"field1\"\r\n\r\nJoe Blow\r\n--AaB03x\r\ncontent-disposition: form-data; name=\"pics\"; filename=\"file1.txt\"\r\nContent-Type: text/plain\r\nContent-Transfer-Encoding: binary\r\n\r\nfiledata\r\n--AaB03x--\r\n" | 90 | "--AaB03x\r\ncontent-disposition: form-data; name=\"field1\"\r\n\r\n" \ |
91 | "Joe Blow\r\n--AaB03x\r\ncontent-disposition: form-data; name=\"pics\";" \ | ||
92 | " filename=\"file1.txt\"\r\nContent-Type: text/plain\r\n" \ | ||
93 | "Content-Transfer-Encoding: binary\r\n\r\nfiledata\r\n--AaB03x--\r\n" | ||
91 | #define FORM_START (URL_ENC_END + 1) | 94 | #define FORM_START (URL_ENC_END + 1) |
92 | {"field1", NULL, NULL, NULL, "Joe Blow"}, | 95 | {"field1", NULL, NULL, NULL, "Joe Blow"}, |
93 | {"pics", "file1.txt", "text/plain", "binary", "filedata"}, | 96 | {"pics", "file1.txt", "text/plain", "binary", "filedata"}, |
94 | #define FORM_END (FORM_START + 2) | 97 | #define FORM_END (FORM_START + 2) |
95 | {NULL, NULL, NULL, NULL, NULL}, | 98 | {NULL, NULL, NULL, NULL, NULL}, |
96 | #define FORM_NESTED_DATA \ | 99 | #define FORM_NESTED_DATA \ |
97 | "--AaB03x\r\ncontent-disposition: form-data; name=\"field1\"\r\n\r\nJane Blow\r\n--AaB03x\r\ncontent-disposition: form-data; name=\"pics\"\r\nContent-type: multipart/mixed, boundary=BbC04y\r\n\r\n--BbC04y\r\nContent-disposition: attachment; filename=\"file1.txt\"\r\nContent-Type: text/plain\r\n\r\nfiledata1\r\n--BbC04y\r\nContent-disposition: attachment; filename=\"file2.gif\"\r\nContent-type: image/gif\r\nContent-Transfer-Encoding: binary\r\n\r\nfiledata2\r\n--BbC04y--\r\n--AaB03x--" | 100 | "--AaB03x\r\ncontent-disposition: form-data; name=\"field1\"\r\n\r\n" \ |
101 | "Jane Blow\r\n--AaB03x\r\ncontent-disposition: form-data; name=\"pics\"\r\n" \ | ||
102 | "Content-type: multipart/mixed, boundary=BbC04y\r\n\r\n--BbC04y\r\n" \ | ||
103 | "Content-disposition: attachment; filename=\"file1.txt\"\r\n" \ | ||
104 | "Content-Type: text/plain\r\n\r\nfiledata1\r\n--BbC04y\r\n" \ | ||
105 | "Content-disposition: attachment; filename=\"file2.gif\"\r\n" \ | ||
106 | "Content-type: image/gif\r\nContent-Transfer-Encoding: binary\r\n\r\n" \ | ||
107 | "filedata2\r\n--BbC04y--\r\n--AaB03x--" | ||
98 | #define FORM_NESTED_START (FORM_END + 1) | 108 | #define FORM_NESTED_START (FORM_END + 1) |
99 | {"field1", NULL, NULL, NULL, "Jane Blow"}, | 109 | {"field1", NULL, NULL, NULL, "Jane Blow"}, |
100 | {"pics", "file1.txt", "text/plain", NULL, "filedata1"}, | 110 | {"pics", "file1.txt", "text/plain", NULL, "filedata1"}, |
@@ -210,13 +220,13 @@ value_checker (void *cls, | |||
210 | } | 220 | } |
211 | 221 | ||
212 | 222 | ||
213 | static int | 223 | static unsigned int |
214 | test_urlencoding_case (unsigned int want_start, | 224 | test_urlencoding_case (unsigned int want_start, |
215 | unsigned int want_end, | 225 | unsigned int want_end, |
216 | const char *url_data) | 226 | const char *url_data) |
217 | { | 227 | { |
218 | size_t step; | 228 | size_t step; |
219 | int errors = 0; | 229 | unsigned int errors = 0; |
220 | const size_t size = strlen (url_data); | 230 | const size_t size = strlen (url_data); |
221 | 231 | ||
222 | for (step = 1; size >= step; ++step) | 232 | for (step = 1; size >= step; ++step) |
@@ -278,7 +288,7 @@ test_urlencoding_case (unsigned int want_start, | |||
278 | } | 288 | } |
279 | 289 | ||
280 | 290 | ||
281 | static int | 291 | static unsigned int |
282 | test_urlencoding (void) | 292 | test_urlencoding (void) |
283 | { | 293 | { |
284 | unsigned int errorCount = 0; | 294 | unsigned int errorCount = 0; |
@@ -357,7 +367,7 @@ test_urlencoding (void) | |||
357 | } | 367 | } |
358 | 368 | ||
359 | 369 | ||
360 | static int | 370 | static unsigned int |
361 | test_multipart_garbage (void) | 371 | test_multipart_garbage (void) |
362 | { | 372 | { |
363 | struct MHD_Connection connection; | 373 | struct MHD_Connection connection; |
@@ -425,7 +435,7 @@ test_multipart_garbage (void) | |||
425 | } | 435 | } |
426 | 436 | ||
427 | 437 | ||
428 | static int | 438 | static unsigned int |
429 | test_multipart_splits (void) | 439 | test_multipart_splits (void) |
430 | { | 440 | { |
431 | struct MHD_Connection connection; | 441 | struct MHD_Connection connection; |
@@ -487,7 +497,7 @@ test_multipart_splits (void) | |||
487 | } | 497 | } |
488 | 498 | ||
489 | 499 | ||
490 | static int | 500 | static unsigned int |
491 | test_multipart (void) | 501 | test_multipart (void) |
492 | { | 502 | { |
493 | struct MHD_Connection connection; | 503 | struct MHD_Connection connection; |
@@ -544,7 +554,7 @@ test_multipart (void) | |||
544 | } | 554 | } |
545 | 555 | ||
546 | 556 | ||
547 | static int | 557 | static unsigned int |
548 | test_nested_multipart (void) | 558 | test_nested_multipart (void) |
549 | { | 559 | { |
550 | struct MHD_Connection connection; | 560 | struct MHD_Connection connection; |
@@ -619,8 +629,8 @@ value_checker2 (void *cls, | |||
619 | } | 629 | } |
620 | 630 | ||
621 | 631 | ||
622 | static int | 632 | static unsigned int |
623 | test_overflow () | 633 | test_overflow (void) |
624 | { | 634 | { |
625 | struct MHD_Connection connection; | 635 | struct MHD_Connection connection; |
626 | struct MHD_HTTP_Req_Header header; | 636 | struct MHD_HTTP_Req_Header header; |
@@ -675,7 +685,7 @@ test_overflow () | |||
675 | } | 685 | } |
676 | 686 | ||
677 | 687 | ||
678 | static int | 688 | static unsigned int |
679 | test_empty_key (void) | 689 | test_empty_key (void) |
680 | { | 690 | { |
681 | const char form_data[] = "=abcdef"; | 691 | const char form_data[] = "=abcdef"; |
@@ -726,7 +736,7 @@ test_empty_key (void) | |||
726 | } | 736 | } |
727 | 737 | ||
728 | 738 | ||
729 | static int | 739 | static unsigned int |
730 | test_double_value (void) | 740 | test_double_value (void) |
731 | { | 741 | { |
732 | const char form_data[] = URL_DATA "=abcdef"; | 742 | const char form_data[] = URL_DATA "=abcdef"; |
@@ -822,5 +832,5 @@ main (int argc, char *const *argv) | |||
822 | errorCount += test_overflow (); | 832 | errorCount += test_overflow (); |
823 | if (errorCount != 0) | 833 | if (errorCount != 0) |
824 | fprintf (stderr, "Error (code: %u)\n", errorCount); | 834 | fprintf (stderr, "Error (code: %u)\n", errorCount); |
825 | return errorCount != 0; /* 0 == pass */ | 835 | return (errorCount == 0) ? 0 : 1; /* 0 == pass */ |
826 | } | 836 | } |
diff --git a/src/microhttpd/test_postprocessor_amp.c b/src/microhttpd/test_postprocessor_amp.c index 0569cb1f..c72b85f3 100644 --- a/src/microhttpd/test_postprocessor_amp.c +++ b/src/microhttpd/test_postprocessor_amp.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | uint64_t num_errors; | 8 | uint64_t num_errors; |
9 | 9 | ||
10 | enum MHD_Result | 10 | static enum MHD_Result |
11 | check_post (void *cls, enum MHD_ValueKind kind, const char *key, | 11 | check_post (void *cls, enum MHD_ValueKind kind, const char *key, |
12 | const char *filename, const char *content_type, | 12 | const char *filename, const char *content_type, |
13 | const char *content_encoding, const char *data, | 13 | const char *content_encoding, const char *data, |
@@ -32,7 +32,50 @@ main (int argc, char *const *argv) | |||
32 | struct MHD_HTTP_Req_Header header; | 32 | struct MHD_HTTP_Req_Header header; |
33 | struct MHD_PostProcessor *pp; | 33 | struct MHD_PostProcessor *pp; |
34 | const char *post = | 34 | const char *post = |
35 | "a=xx+xx+xxx+xxxxx+xxxx+xxxxxxxx+xxx+xxxxxx+xxx+xxx+xxxxxxx+xxxxx%0A+++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++--%3E%0A++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%25%22%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%22+xxxxx%3D%22xxxxx%22%3E%0A+++++++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%25%22%3E%0A+++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++++++++++++++%3Cxx+xxxxx%3D%22xxxx%22%3E%0A+++++++++++++++++++++++++++++++%3Cx+xxxxx%3D%22xxxx-xxxxx%3Axxxxx%22%3Exxxxx%3A%3C%2Fx%3E%0A%0A+++++++++++++++++++++++++++++++%3Cx+xxxxx%3D%22xxxx-xxxxx%3Axxxxx%22%3Exxx%3A%3C%2Fx%3E%0A%0A+++++++++++++++++++++++++++++++%3Cx+xxxxx%3D%22xxxx-xxxxx%3Axxxxx%3B+xxxx-xxxxxx%3A+xxxx%3B%22%3Exxxxx+xxxxx%3A%3C%2Fx%3E%0A+++++++++++++++++++++++++++%3C%2Fxx%3E%0A+++++++++++++++++++++++%3C%2Fxx%3E%0A+++++++++++++++++++%3C%2Fxxxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++++++%3Cxx+xxxxx%3D%22xxxx-xxxxx%3A+xxxxx%3B+xxxxx%3A+xxxx%22%3E%26xxxxx%3B+%3Cxxxx%0A+++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxxxxxxx%22%3Exxxx.xx%3C%2Fxxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A++++++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++++++%3Cxx+xxxxx%3D%22xxxx-xxxxx%3A+xxxxx%3B+xxxxx%3A+xxxx%22%3E%26xxxxx%3B+%3Cxxxx%0A+++++++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxxxxxxx%22%3Exxx.xx%3C%2Fxxxx%3E%0A+++++++++++++++++++%3C%2Fxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxx%3D%22xxxx-xxxxx%3A+xxxxx%3Bxxxx-xxxxxx%3A+xxxx%3B+xxxxx%3A+xxxx%22%3E%26xxxxx%3B+%3Cxxxx%0A+++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxxxxxxx%22%3Exxxx.xx%3C%2Fxxxx%3E%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++++++%3C%2Fxxxxx%3E%0A+++++++%3C%21--%0A+++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++xxx+xx+xxxxx+xxxxxxx+xxxxxxx%0A+++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++--%3E%0A+++%3C%2Fxxx%3E%0A%0A%0A%0A+++%3Cxxx+xxxxx%3D%22xxxxxxxxx%22+xx%3D%22xxxxxxxxx%22%3E%3C%2Fxxx%3E%0A%0A+++%3Cxxx+xx%3D%22xxxx%22+xxxxx%3D%22xxxx%22%3E%0A+++++++%3Cxxxxx+xxxxx%3D%22xxxxxxxxx%22%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%22+xx%3D%22xxxxxxxxxxxxx%22+xxxxx%3D%22xxxxxxxxxxxxx%22%3E%0A+++++++++++++++++++%3Cxxx+xx%3D%22xxxxxx%22%3E%3C%2Fxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xx%3D%22xxxxxxxxxxxxxxxxx%22+xxxxx%3D%22xxxxxxxxxxxxxxxxx%22%3E%3C%2Fxx%3E%0A+++++++++++++++%3Cxx+xx%3D%22xxxxxxxxxxxxxx%22+xxxxx%3D%22xxxxxxxxxxxxxx%22%3E%0A+++++++++++++++++++%3Cxxx+xx%3D%22xxxxxxx%22%3E%3C%2Fxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%22+xx%3D%22xxxxxxxxxxxxx%22+xxxxx%3D%22xxxxxxxxxxxxx%22%3E%0A+++++++++++++++++++%3Cxxx+xx%3D%22xxxxxx%22%3E%3C%2Fxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++++++%3C%2Fxxxxx%3E%0A+++%3C%2Fxxx%3E%0A%3C%2Fxxx%3E%0A%0A%3Cxxx+xx%3D%22xxxxxx%22%3E%3C%2Fxxx%3E%0A%0A%3C%2Fxxxx%3E%0A%3C%2Fxxxx%3E+&b=value"; | 35 | "a=xx+xx+xxx+xxxxx+xxxx+xxxxxxxx+xxx+xxxxxx+xxx+xxx+xxxxxxx+xxxxx%0A+++" |
36 | "++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
37 | "xxxxxxxxxxxxxx%0A+++++++--%3E%0A++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%" | ||
38 | "25%22%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%2" | ||
39 | "2+xxxxx%3D%22xxxxx%22%3E%0A+++++++++++++++++++%3Cxxxxx+xxxxx%3D%22xxx%" | ||
40 | "25%22%3E%0A+++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++++++++++++" | ||
41 | "++%3Cxx+xxxxx%3D%22xxxx%22%3E%0A+++++++++++++++++++++++++++++++%3Cx+xx" | ||
42 | "xxx%3D%22xxxx-xxxxx%3Axxxxx%22%3Exxxxx%3A%3C%2Fx%3E%0A%0A+++++++++++++" | ||
43 | "++++++++++++++++++%3Cx+xxxxx%3D%22xxxx-xxxxx%3Axxxxx%22%3Exxx%3A%3C%2F" | ||
44 | "x%3E%0A%0A+++++++++++++++++++++++++++++++%3Cx+xxxxx%3D%22xxxx-xxxxx%3A" | ||
45 | "xxxxx%3B+xxxx-xxxxxx%3A+xxxx%3B%22%3Exxxxx+xxxxx%3A%3C%2Fx%3E%0A++++++" | ||
46 | "+++++++++++++++++++++%3C%2Fxx%3E%0A+++++++++++++++++++++++%3C%2Fxx%3E%" | ||
47 | "0A+++++++++++++++++++%3C%2Fxxxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++" | ||
48 | "++++++++++++%3Cxx+xxxxx%3D%22xxxx-xxxxx%3A+xxxxx%3B+xxxxx%3A+xxxx%22%3" | ||
49 | "E%26xxxxx%3B+%3Cxxxx%0A+++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxxxxx" | ||
50 | "xx%22%3Exxxx.xx%3C%2Fxxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A++++++++++" | ||
51 | "+%3C%2Fxx%3E%0A++++++++++++++++++++++++++%3Cxx%3E%0A++++++++++++++++++" | ||
52 | "+%3Cxx+xxxxx%3D%22xxxx-xxxxx%3A+xxxxx%3B+xxxxx%3A+xxxx%22%3E%26xxxxx%3" | ||
53 | "B+%3Cxxxx%0A+++++++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxxxxxxx%22%3" | ||
54 | "Exxx.xx%3C%2Fxxxx%3E%0A+++++++++++++++++++%3C%2Fxx%3E%0A++++++++++++++" | ||
55 | "+%3C%2Fxx%3E%0A++++++++++++++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+x" | ||
56 | "xxxx%3D%22xxxx-xxxxx%3A+xxxxx%3Bxxxx-xxxxxx%3A+xxxx%3B+xxxxx%3A+xxxx%2" | ||
57 | "2%3E%26xxxxx%3B+%3Cxxxx%0A+++++++++++++++++++++++xxxxx%3D%22xxxxxxxxxx" | ||
58 | "xxxxx%22%3Exxxx.xx%3C%2Fxxxx%3E%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A" | ||
59 | "+++++++%3C%2Fxxxxx%3E%0A+++++++%3C%21--%0A+++++++xxxxxxxxxxxxxxxxxxxxx" | ||
60 | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++x" | ||
61 | "xx+xx+xxxxx+xxxxxxx+xxxxxxx%0A+++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
62 | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A+++++++--%3E%0A+++%3" | ||
63 | "C%2Fxxx%3E%0A%0A%0A%0A+++%3Cxxx+xxxxx%3D%22xxxxxxxxx%22+xx%3D%22xxxxxx" | ||
64 | "xxx%22%3E%3C%2Fxxx%3E%0A%0A+++%3Cxxx+xx%3D%22xxxx%22+xxxxx%3D%22xxxx%2" | ||
65 | "2%3E%0A+++++++%3Cxxxxx+xxxxx%3D%22xxxxxxxxx%22%3E%0A+++++++++++%3Cxx%3" | ||
66 | "E%0A+++++++++++++++%3Cxx+xxxxxxx%3D%22x%22+xx%3D%22xxxxxxxxxxxxx%22+xx" | ||
67 | "xxx%3D%22xxxxxxxxxxxxx%22%3E%0A+++++++++++++++++++%3Cxxx+xx%3D%22xxxxx" | ||
68 | "x%22%3E%3C%2Fxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx" | ||
69 | "%3E%0A+++++++++++%3Cxx%3E%0A+++++++++++++++%3Cxx+xx%3D%22xxxxxxxxxxxxx" | ||
70 | "xxxx%22+xxxxx%3D%22xxxxxxxxxxxxxxxxx%22%3E%3C%2Fxx%3E%0A++++++++++++++" | ||
71 | "+%3Cxx+xx%3D%22xxxxxxxxxxxxxx%22+xxxxx%3D%22xxxxxxxxxxxxxx%22%3E%0A+++" | ||
72 | "++++++++++++++++%3Cxxx+xx%3D%22xxxxxxx%22%3E%3C%2Fxxx%3E%0A+++++++++++" | ||
73 | "++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++++++++++%3Cxx%3E%0A+++++" | ||
74 | "++++++++++%3Cxx+xxxxxxx%3D%22x%22+xx%3D%22xxxxxxxxxxxxx%22+xxxxx%3D%22" | ||
75 | "xxxxxxxxxxxxx%22%3E%0A+++++++++++++++++++%3Cxxx+xx%3D%22xxxxxx%22%3E%3" | ||
76 | "C%2Fxxx%3E%0A+++++++++++++++%3C%2Fxx%3E%0A+++++++++++%3C%2Fxx%3E%0A+++" | ||
77 | "++++%3C%2Fxxxxx%3E%0A+++%3C%2Fxxx%3E%0A%3C%2Fxxx%3E%0A%0A%3Cxxx+xx%3D%" | ||
78 | "22xxxxxx%22%3E%3C%2Fxxx%3E%0A%0A%3C%2Fxxxx%3E%0A%3C%2Fxxxx%3E+&b=value"; | ||
36 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ | 79 | (void) argc; (void) argv; /* Unused. Silent compiler warning. */ |
37 | 80 | ||
38 | num_errors = 0; | 81 | num_errors = 0; |
diff --git a/src/microhttpd/test_postprocessor_large.c b/src/microhttpd/test_postprocessor_large.c index 0a821f09..9f7096fa 100644 --- a/src/microhttpd/test_postprocessor_large.c +++ b/src/microhttpd/test_postprocessor_large.c | |||
@@ -42,7 +42,7 @@ value_checker (void *cls, | |||
42 | const char *transfer_encoding, | 42 | const char *transfer_encoding, |
43 | const char *data, uint64_t off, size_t size) | 43 | const char *data, uint64_t off, size_t size) |
44 | { | 44 | { |
45 | unsigned int *pos = cls; | 45 | size_t *pos = (size_t *) cls; |
46 | (void) kind; (void) key; (void) filename; (void) content_type; /* Unused. Silent compiler warning. */ | 46 | (void) kind; (void) key; (void) filename; (void) content_type; /* Unused. Silent compiler warning. */ |
47 | (void) transfer_encoding; (void) data; (void) off; /* Unused. Silent compiler warning. */ | 47 | (void) transfer_encoding; (void) data; (void) off; /* Unused. Silent compiler warning. */ |
48 | #if 0 | 48 | #if 0 |
@@ -60,7 +60,7 @@ value_checker (void *cls, | |||
60 | 60 | ||
61 | 61 | ||
62 | static int | 62 | static int |
63 | test_simple_large () | 63 | test_simple_large (void) |
64 | { | 64 | { |
65 | struct MHD_Connection connection; | 65 | struct MHD_Connection connection; |
66 | struct MHD_HTTP_Req_Header header; | 66 | struct MHD_HTTP_Req_Header header; |
@@ -69,7 +69,7 @@ test_simple_large () | |||
69 | size_t delta; | 69 | size_t delta; |
70 | size_t size; | 70 | size_t size; |
71 | char data[102400]; | 71 | char data[102400]; |
72 | unsigned int pos; | 72 | size_t pos; |
73 | 73 | ||
74 | pos = 0; | 74 | pos = 0; |
75 | memset (data, 'A', sizeof (data)); | 75 | memset (data, 'A', sizeof (data)); |