From a88f3149a88b879eb21d28156d6dea08dbc93956 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Tue, 30 Jan 2024 23:04:32 +0100 Subject: [PATCH] Muted some compiler warnings --- src/microhttpd/mhd_str.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c index d01086ac..29c8f3f9 100644 --- a/src/microhttpd/mhd_str.c +++ b/src/microhttpd/mhd_str.c @@ -1575,7 +1575,7 @@ MHD_uint16_to_str (uint16_t val, buf_size--; if (1 == divisor) return (size_t) (chr - buf); - val %= divisor; + val = (uint16_t) (val % divisor); divisor /= 10; digit = (int) (val / divisor); mhd_assert (digit < 10); @@ -1733,8 +1733,8 @@ MHD_hex_to_bin (const char *hex, const int l = toxdigitvalue (hex[r++]); if ((0 > h) || (0 > l)) return 0; - out[w++] = ( ((uint8_t) (((uint8_t) ((unsigned int) h)) << 4)) - | ((uint8_t) ((unsigned int) l)) ); + out[w++] = (uint8_t) ( ((uint8_t) (((uint8_t) ((unsigned int) h)) << 4)) + | ((uint8_t) ((unsigned int) l)) ); } mhd_assert (len == r); mhd_assert ((len + 1) / 2 == w);