1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add FALLTHROUGH

Pointed out by Coverity Scan

```
** CID 1466646: Control flow issues (MISSING_BREAK)
/ext/-test-/random/loop.c: 63 in loop_get_bytes()
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-09-08 10:30:07 +09:00
parent 2b07b24bdf
commit 5be75aad37
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -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--;