aboutsummaryrefslogtreecommitdiffstats
path: root/liblss16_decode_to_colour_index.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-03 16:43:19 +0100
committerMattias Andrée <m@maandree.se>2025-03-03 16:44:37 +0100
commite114123df2a05650f0f7e34044c1e8f829c50a44 (patch)
tree48c408b469d5fc3f1acdf4468ad6f22da8a65370 /liblss16_decode_to_colour_index.c
parentm (diff)
downloadliblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.gz
liblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.bz2
liblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.xz
misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'liblss16_decode_to_colour_index.c')
-rw-r--r--liblss16_decode_to_colour_index.c8
1 files changed, 6 insertions, 2 deletions
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 <string.h>
+#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;