cstylecasts and suppressions

This commit is contained in:
gtsoul-tech
2024-05-22 10:16:56 +03:00
parent b312112e87
commit 94eff4aa60
5 changed files with 11 additions and 3 deletions

View File

@@ -237,6 +237,7 @@ unichar readUtf8CodePoint2c(const char *s) {
static
unichar readUtf8CodePoint3c(const char *s) {
// cppcheck-suppress cstyleCast
auto *ts = (const u8 *)s;
assert(ts[0] >= 0xe0 && ts[0] < 0xf0);
assert(ts[1] >= 0x80 && ts[1] < 0xc0);
@@ -253,6 +254,7 @@ unichar readUtf8CodePoint3c(const char *s) {
static
unichar readUtf8CodePoint4c(const char *s) {
// cppcheck-suppress cstyleCast
auto *ts = (const u8 *)s;
assert(ts[0] >= 0xf0 && ts[0] < 0xf8);
assert(ts[1] >= 0x80 && ts[1] < 0xc0);