Skip to content

Commit

Permalink
Add FALLTHROUGH
Browse files Browse the repository at this point in the history
Pointed out by Coverity Scan

```
** CID 1466646: Control flow issues (MISSING_BREAK)
/ext/-test-/random/loop.c: 63 in loop_get_bytes()
```
  • Loading branch information
znz committed Sep 8, 2020
1 parent 2b07b24 commit 5be75aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/-test-/random/loop.c
Expand Up @@ -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--;
Expand Down

0 comments on commit 5be75aa

Please sign in to comment.