summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-08 10:30:07 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-08 10:30:07 +0900
commit5be75aad3792c90f1d4de424fc07bc4f652e554e (patch)
tree759793b3aab67ad3a6a66ce298b6cb2bcd6c6e44 /ext/-test-
parent2b07b24bdf15e4feeb9dae94a17999070cd77121 (diff)
Add FALLTHROUGH
Pointed out by Coverity Scan ``` ** CID 1466646: Control flow issues (MISSING_BREAK) /ext/-test-/random/loop.c: 63 in loop_get_bytes() ```
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/random/loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/-test-/random/loop.c b/ext/-test-/random/loop.c
index ec4eff013e7..05720964031 100644
--- a/ext/-test-/random/loop.c
+++ b/ext/-test-/random/loop.c
@@ -63,12 +63,15 @@ loop_get_bytes(rb_random_t *rnd, void *p, size_t n)
case 0:
*buf++ = (uint8_t)x;
n--;
+ /* FALLTHROUGH */
case 3:
*buf++ = (uint8_t)x;
n--;
+ /* FALLTHROUGH */
case 2:
*buf++ = (uint8_t)x;
n--;
+ /* FALLTHROUGH */
case 1:
*buf++ = (uint8_t)x;
n--;