aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-13 21:26:31 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-13 21:26:31 +0300
commit70f6be39a13d6fc38ec7375d81fd20cccb70af58 (patch)
treeccfd7936bfcd74e9a1728d30124f24f26aad0a56 /src
parentfd3ff5c6238f3bb3402d852995f3fa6caed5b377 (diff)
downloadlibmicrohttpd-70f6be39a13d6fc38ec7375d81fd20cccb70af58.tar.gz
libmicrohttpd-70f6be39a13d6fc38ec7375d81fd20cccb70af58.zip
test_str_token{,s,s_remove}: fixed compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/microhttpd/test_str_token.c4
-rw-r--r--src/microhttpd/test_str_token_remove.c7
-rw-r--r--src/microhttpd/test_str_tokens_remove.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/microhttpd/test_str_token.c b/src/microhttpd/test_str_token.c
index 1e1eab28..fe7b111c 100644
--- 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)
61#define expect_not_found(s,t) expect_not_found_n ((s),(t),MHD_STATICSTR_LEN_ ( \ 61#define expect_not_found(s,t) expect_not_found_n ((s),(t),MHD_STATICSTR_LEN_ ( \
62 t)) 62 t))
63 63
64int 64static int
65check_match (void) 65check_match (void)
66{ 66{
67 int errcount = 0; 67 int errcount = 0;
@@ -89,7 +89,7 @@ check_match (void)
89} 89}
90 90
91 91
92int 92static int
93check_not_match (void) 93check_not_match (void)
94{ 94{
95 int errcount = 0; 95 int errcount = 0;
diff --git a/src/microhttpd/test_str_token_remove.c b/src/microhttpd/test_str_token_remove.c
index a4f7ae55..3e9b61ef 100644
--- 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,
56 ssize_t result_len; 56 ssize_t result_len;
57 memset (buf_out, '$', sizeof(buf_out)); 57 memset (buf_out, '$', sizeof(buf_out));
58 58
59 result_len = buf_len; 59 result_len = (ssize_t) buf_len;
60 mhd_assert (0 <= result_len);
60 61
61 res = MHD_str_remove_token_caseless_ (buf_in, str_len, buf_token, token_len, 62 res = MHD_str_remove_token_caseless_ (buf_in, str_len, buf_token, token_len,
62 buf_out, &result_len); 63 buf_out, &result_len);
@@ -79,7 +80,7 @@ expect_result_n (const char *str, size_t str_len,
79 if ( (expected_removed != res) || 80 if ( (expected_removed != res) ||
80 (expected_len != (size_t) result_len) || 81 (expected_len != (size_t) result_len) ||
81 ((0 != result_len) && (0 != memcmp (expected, buf_out, 82 ((0 != result_len) && (0 != memcmp (expected, buf_out,
82 result_len))) || 83 (size_t) result_len))) ||
83 ('$' != buf_out[result_len])) 84 ('$' != buf_out[result_len]))
84 { 85 {
85 fprintf (stderr, 86 fprintf (stderr,
@@ -104,7 +105,7 @@ expect_result_n (const char *str, size_t str_len,
104 (t),MHD_STATICSTR_LEN_ (t), \ 105 (t),MHD_STATICSTR_LEN_ (t), \
105 (e),MHD_STATICSTR_LEN_ (e), found) 106 (e),MHD_STATICSTR_LEN_ (e), found)
106 107
107int 108static int
108check_result (void) 109check_result (void)
109{ 110{
110 int errcount = 0; 111 int errcount = 0;
diff --git a/src/microhttpd/test_str_tokens_remove.c b/src/microhttpd/test_str_tokens_remove.c
index 1cd1696b..b6b3caac 100644
--- 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,
89 (t),MHD_STATICSTR_LEN_ (t), \ 89 (t),MHD_STATICSTR_LEN_ (t), \
90 (e),MHD_STATICSTR_LEN_ (e), found) 90 (e),MHD_STATICSTR_LEN_ (e), found)
91 91
92int 92static int
93check_result (void) 93check_result (void)
94{ 94{
95 int errcount = 0; 95 int errcount = 0;