ruby-changes:62862
From: Kazuhiro <ko1@a...>
Date: Tue, 8 Sep 2020 10:31:47 +0900 (JST)
Subject: [ruby-changes:62862] 5be75aad37 (master): Add FALLTHROUGH
https://git.ruby-lang.org/ruby.git/commit/?id=5be75aad37 From 5be75aad3792c90f1d4de424fc07bc4f652e554e Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> 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() ``` diff --git a/ext/-test-/random/loop.c b/ext/-test-/random/loop.c index ec4eff0..0572096 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) https://github.com/ruby/ruby/blob/trunk/ext/-test-/random/loop.c#L63 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/