From 5be75aad3792c90f1d4de424fc07bc4f652e554e Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Tue, 8 Sep 2020 10:30:07 +0900 Subject: Add FALLTHROUGH Pointed out by Coverity Scan ``` ** CID 1466646: Control flow issues (MISSING_BREAK) /ext/-test-/random/loop.c: 63 in loop_get_bytes() ``` --- ext/-test-/random/loop.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/-test-/random') diff --git a/ext/-test-/random/loop.c b/ext/-test-/random/loop.c index ec4eff013e..0572096403 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--; -- cgit v1.2.3