libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 70f6be39a13d6fc38ec7375d81fd20cccb70af58
parent fd3ff5c6238f3bb3402d852995f3fa6caed5b377
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 13 Jun 2022 21:26:31 +0300

test_str_token{,s,s_remove}: fixed compiler warnings

Diffstat:
Msrc/microhttpd/test_str_token.c | 4++--
Msrc/microhttpd/test_str_token_remove.c | 7++++---
Msrc/microhttpd/test_str_tokens_remove.c | 2+-
3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/microhttpd/test_str_token.c b/src/microhttpd/test_str_token.c @@ -61,7 +61,7 @@ expect_not_found_n (const char *str, const char *token, size_t token_len) #define expect_not_found(s,t) expect_not_found_n ((s),(t),MHD_STATICSTR_LEN_ ( \ t)) -int +static int check_match (void) { int errcount = 0; @@ -89,7 +89,7 @@ check_match (void) } -int +static int check_not_match (void) { int errcount = 0; diff --git a/src/microhttpd/test_str_token_remove.c b/src/microhttpd/test_str_token_remove.c @@ -56,7 +56,8 @@ expect_result_n (const char *str, size_t str_len, ssize_t result_len; memset (buf_out, '$', sizeof(buf_out)); - result_len = buf_len; + result_len = (ssize_t) buf_len; + mhd_assert (0 <= result_len); res = MHD_str_remove_token_caseless_ (buf_in, str_len, buf_token, token_len, buf_out, &result_len); @@ -79,7 +80,7 @@ expect_result_n (const char *str, size_t str_len, if ( (expected_removed != res) || (expected_len != (size_t) result_len) || ((0 != result_len) && (0 != memcmp (expected, buf_out, - result_len))) || + (size_t) result_len))) || ('$' != buf_out[result_len])) { fprintf (stderr, @@ -104,7 +105,7 @@ expect_result_n (const char *str, size_t str_len, (t),MHD_STATICSTR_LEN_ (t), \ (e),MHD_STATICSTR_LEN_ (e), found) -int +static int check_result (void) { int errcount = 0; diff --git a/src/microhttpd/test_str_tokens_remove.c b/src/microhttpd/test_str_tokens_remove.c @@ -89,7 +89,7 @@ expect_result_n (const char *str, size_t str_len, (t),MHD_STATICSTR_LEN_ (t), \ (e),MHD_STATICSTR_LEN_ (e), found) -int +static int check_result (void) { int errcount = 0;