aboutsummaryrefslogtreecommitdiffstats
path: root/liblss16_decode_to_colour_index.c
diff options
context:
space:
mode:
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;