libmicrohttpd

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

commit d63cb66783776ce528681beb08b4e76c40c1fc9f
parent d874f86dd20da89c746f0fd36e087240a393b732
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue, 30 Jan 2024 17:08:52 +0100

Muted extra compiler warnings

Diffstat:
Msrc/examples/websocket_threaded_example.c | 2+-
Msrc/microhttpd/mhd_str.c | 18++++++++++--------
Msrc/microhttpd/test_client_put_stop.c | 12++++++------
3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c @@ -675,7 +675,7 @@ ws_receive_frame (unsigned char *frame, ssize_t *length, int *type) { idx_first_mask = 10; } - idx_first_data = idx_first_mask + 4; + idx_first_data = (unsigned char) (idx_first_mask + 4); data_length = (size_t) *length - idx_first_data; masks[0] = frame[idx_first_mask + 0]; masks[1] = frame[idx_first_mask + 1]; diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c @@ -1073,7 +1073,7 @@ MHD_str_remove_tokens_caseless_ (char *str, while (pt < tokens_len && (' ' == t[pt] || '\t' == t[pt])) pt++; /* Found end of the token string or non-whitespace char */ - } while(pt < tokens_len && ',' != t[pt]); + } while (pt < tokens_len && ',' != t[pt]); /* 'tkn' is the input token with 'tkn_len' chars */ mhd_assert (0 != tkn_len); @@ -1531,8 +1531,10 @@ MHD_uint32_to_strx (uint32_t val, while (o_pos < buf_size) { - buf[o_pos++] = (digit <= 9) ? ('0' + (char) digit) : - ('A' + (char) digit - 10); + buf[o_pos++] = + (char) ((digit <= 9) ? + ('0' + (char) digit) : + ('A' + (char) digit - 10)); if (0 == digit_pos) return o_pos; digit_pos--; @@ -1568,7 +1570,7 @@ MHD_uint16_to_str (uint16_t val, while (0 != buf_size) { - *chr = (char) digit + '0'; + *chr = (char) ((char) digit + '0'); chr++; buf_size--; if (1 == divisor) @@ -1609,7 +1611,7 @@ MHD_uint64_to_str (uint64_t val, while (0 != buf_size) { - *chr = (char) digit + '0'; + *chr = (char) ((char) digit + '0'); chr++; buf_size--; if (1 == divisor) @@ -1644,7 +1646,7 @@ MHD_uint8_to_str_pad (uint8_t val, } else { - buf[pos++] = '0' + (char) digit; + buf[pos++] = (char) ('0' + (char) digit); val %= 100; min_digits = 2; } @@ -1659,13 +1661,13 @@ MHD_uint8_to_str_pad (uint8_t val, } else { - buf[pos++] = '0' + (char) digit; + buf[pos++] = (char) ('0' + (char) digit); val %= 10; } if (buf_size <= pos) return 0; - buf[pos++] = '0' + (char) val; + buf[pos++] = (char) ('0' + (char) val); return pos; } diff --git a/src/microhttpd/test_client_put_stop.c b/src/microhttpd/test_client_put_stop.c @@ -1964,17 +1964,17 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, { *pport = 4170; if (use_shutdown) - *pport += 0; + *pport = (uint16_t) (*pport + 0); if (use_close) - *pport += 1; + *pport = (uint16_t) (*pport + 1); if (use_hard_close) - *pport += 1; + *pport = (uint16_t) (*pport + 1); if (by_step) - *pport += 1 << 2; + *pport = (uint16_t) (*pport + (1 << 2)); if (upl_chunked) - *pport += 1 << 3; + *pport = (uint16_t) (*pport + (1 << 3)); if (! oneone) - *pport += 1 << 4; + *pport = (uint16_t) (*pport + (1 << 4)); } if (testMhdThreadExternal == thrType)