summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-30 15:50:03 +1000
committerChris Johns <chrisj@rtems.org>2018-04-30 15:50:03 +1000
commite0a52a4fe49da602245f6b306a7d7c7c8db9aa32 (patch)
treef6b8cb01a1b33f67a401cb6b3deff2c3edf63573
parentrtemstoolkit: Add libdwarf from elftoolchain. (diff)
downloadrtems-tools-e0a52a4fe49da602245f6b306a7d7c7c8db9aa32.tar.bz2
rtemstoolkit: Remove warnings generated on Windows for fall-thru.
-rw-r--r--rtemstoolkit/ConvertUTF.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/rtemstoolkit/ConvertUTF.c b/rtemstoolkit/ConvertUTF.c
index 9b3deeb..fa1b8ed 100644
--- a/rtemstoolkit/ConvertUTF.c
+++ b/rtemstoolkit/ConvertUTF.c
@@ -446,9 +446,10 @@ ConversionResult ConvertUTF32toUTF8 (
}
switch (bytesToWrite) { /* note: everything falls through. */
case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6;
- case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]);
+ /* fall-thru */
+ case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; /* fall-thru */
+ case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; /* fall-thru */
+ case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); /* fall-thru */
}
target += bytesToWrite;
}
@@ -480,12 +481,12 @@ ConversionResult ConvertUTF8toUTF32 (
* The cases all fall through. See "Note A" below.
*/
switch (extraBytesToRead) {
- case 5: ch += *source++; ch <<= 6;
- case 4: ch += *source++; ch <<= 6;
- case 3: ch += *source++; ch <<= 6;
- case 2: ch += *source++; ch <<= 6;
- case 1: ch += *source++; ch <<= 6;
- case 0: ch += *source++;
+ case 5: ch += *source++; ch <<= 6; /* fall-thru */
+ case 4: ch += *source++; ch <<= 6; /* fall-thru */
+ case 3: ch += *source++; ch <<= 6; /* fall-thru */
+ case 2: ch += *source++; ch <<= 6; /* fall-thru */
+ case 1: ch += *source++; ch <<= 6; /* fall-thru */
+ case 0: ch += *source++; /* fall-thru */
}
ch -= offsetsFromUTF8[extraBytesToRead];