From e114123df2a05650f0f7e34044c1e8f829c50a44 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 3 Mar 2025 16:43:19 +0100 Subject: misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- liblss16_decode_to_colour_index.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'liblss16_decode_to_colour_index.c') diff --git a/liblss16_decode_to_colour_index.c b/liblss16_decode_to_colour_index.c index a552289..e1845e9 100644 --- a/liblss16_decode_to_colour_index.c +++ b/liblss16_decode_to_colour_index.c @@ -2,6 +2,11 @@ #include "liblss16.h" #include +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wimplicit-fallthrough" +# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +#endif + enum liblss16_decode_state liblss16_decode_to_colour_index(struct liblss16_decoder *decoder, @@ -210,11 +215,10 @@ liblss16_decode_to_colour_index(struct liblss16_decoder *decoder, } else if (decoder->internal.state == 2U) { decoder->internal.state = (uint8_t)(n | 128U); } else { - m = (uint16_t)((n << 4) + (decoder->internal.state & 15U) + 16U); + m = (uint16_t)((unsigned)(n << 4) + (decoder->internal.state & 15U) + 16U); goto put_m_pixels; } } - break; } return LIBLSS16_DECODE_RUNNING; -- cgit v1.2.3-70-g09d2