[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 06/09: test_str_token{,s,s_remove}: fixed compiler warni
From: |
gnunet |
Subject: |
[libmicrohttpd] 06/09: test_str_token{,s,s_remove}: fixed compiler warnings |
Date: |
Mon, 13 Jun 2022 20:28:37 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 70f6be39a13d6fc38ec7375d81fd20cccb70af58
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Jun 13 21:26:31 2022 +0300
test_str_token{,s,s_remove}: fixed compiler warnings
---
src/microhttpd/test_str_token.c | 4 ++--
src/microhttpd/test_str_token_remove.c | 7 ++++---
src/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
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)
#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
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,
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
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,
(t),MHD_STATICSTR_LEN_ (t), \
(e),MHD_STATICSTR_LEN_ (e), found)
-int
+static int
check_result (void)
{
int errcount = 0;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (6884fa83 -> 9668d71f), gnunet, 2022/06/13
- [libmicrohttpd] 04/09: test_postprocessor{,_amp,_large}: fixed compiler warnings, fixed extra-long strings, gnunet, 2022/06/13
- [libmicrohttpd] 02/09: postprocessor.c: added assert, gnunet, 2022/06/13
- [libmicrohttpd] 03/09: test_postprocessor_md: removed include of .c file, fixed extra long lines, gnunet, 2022/06/13
- [libmicrohttpd] 08/09: test_http_reasons: fixed compiler warnings, gnunet, 2022/06/13
- [libmicrohttpd] 09/09: test_start_stop: fixed compiler warnings, gnunet, 2022/06/13
- [libmicrohttpd] 05/09: test_str: minor refactoring, fixed compiler warnings, gnunet, 2022/06/13
- [libmicrohttpd] 01/09: postprocessor.h: added new internal header, gnunet, 2022/06/13
- [libmicrohttpd] 07/09: test_daemon: fixed compiler warnings, gnunet, 2022/06/13
- [libmicrohttpd] 06/09: test_str_token{,s,s_remove}: fixed compiler warnings,
gnunet <=