diff options
author | Torbjörn Andersson | 2017-08-06 13:30:51 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2017-08-06 13:30:51 +0200 |
commit | 70a2ca8b7d64e993fdab89c7b8b0d30ab4334824 (patch) | |
tree | 2e0686f9a69dc65cf8f2aeb801ccae8f2352b635 /engines/wintermute/utils/convert_utf.cpp | |
parent | 38a8015b830f8cec32f07bb9262d47cf096644e5 (diff) | |
download | scummvm-rg350-70a2ca8b7d64e993fdab89c7b8b0d30ab4334824.tar.gz scummvm-rg350-70a2ca8b7d64e993fdab89c7b8b0d30ab4334824.tar.bz2 scummvm-rg350-70a2ca8b7d64e993fdab89c7b8b0d30ab4334824.zip |
JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
Diffstat (limited to 'engines/wintermute/utils/convert_utf.cpp')
-rw-r--r-- | engines/wintermute/utils/convert_utf.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engines/wintermute/utils/convert_utf.cpp b/engines/wintermute/utils/convert_utf.cpp index cdb48103d0..8e02ec2df4 100644 --- a/engines/wintermute/utils/convert_utf.cpp +++ b/engines/wintermute/utils/convert_utf.cpp @@ -280,14 +280,18 @@ ConversionResult ConvertUTF16toUTF8( case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); + // fall through } target += bytesToWrite; } @@ -318,8 +322,10 @@ static bool isLegalUTF8(const UTF8 *source, int length) { /* Everything else falls through when "true"... */ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; + // fall through case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; + // fall through case 2: if ((a = (*--srcptr)) > 0xBF) return false; @@ -340,6 +346,7 @@ static bool isLegalUTF8(const UTF8 *source, int length) { default: if (a < 0x80) return false; } + // fall through case 1: if (*source >= 0x80 && *source < 0xC2) return false; @@ -389,18 +396,23 @@ ConversionResult ConvertUTF8toUTF16( case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + // fall through case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + // fall through case 3: ch += *source++; ch <<= 6; + // fall through case 2: ch += *source++; ch <<= 6; + // fall through case 1: ch += *source++; ch <<= 6; + // fall through case 0: ch += *source++; } @@ -500,12 +512,15 @@ ConversionResult ConvertUTF32toUTF8( case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + // fall through case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); } @@ -543,18 +558,23 @@ ConversionResult ConvertUTF8toUTF32( case 5: ch += *source++; ch <<= 6; + // fall through case 4: ch += *source++; ch <<= 6; + // fall through case 3: ch += *source++; ch <<= 6; + // fall through case 2: ch += *source++; ch <<= 6; + // fall through case 1: ch += *source++; ch <<= 6; + // fall through case 0: ch += *source++; } |