mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add /* fall through */ comments
to suppress some Coverity Scan warnings
This commit is contained in:
parent
1d46642487
commit
ba94404f70
2 changed files with 5 additions and 3 deletions
|
@ -370,12 +370,12 @@ load_mantissa(double d, const char *buf, long len)
|
|||
do {
|
||||
m = 0;
|
||||
switch (len) {
|
||||
default: m = *buf++ & 0xff;
|
||||
default: m = *buf++ & 0xff; /* fall through */
|
||||
#if MANT_BITS > 24
|
||||
case 3: m = (m << 8) | (*buf++ & 0xff);
|
||||
case 3: m = (m << 8) | (*buf++ & 0xff); /* fall through */
|
||||
#endif
|
||||
#if MANT_BITS > 16
|
||||
case 2: m = (m << 8) | (*buf++ & 0xff);
|
||||
case 2: m = (m << 8) | (*buf++ & 0xff); /* fall through */
|
||||
#endif
|
||||
#if MANT_BITS > 8
|
||||
case 1: m = (m << 8) | (*buf++ & 0xff);
|
||||
|
@ -1799,6 +1799,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
|
|||
case 'L': case 'N': case 'O': case 'P': case 'Q': case 'R':
|
||||
case 'S': case 'T': case 'U': case 'V': case 'X': case 'Y':
|
||||
if (bs & 1) --dst;
|
||||
/* fall through */
|
||||
default: bs = 0; break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -677,6 +677,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
|
|||
case '\n':
|
||||
case '\0':
|
||||
p--;
|
||||
/* fall through */
|
||||
case '%':
|
||||
if (flags != FNONE) {
|
||||
rb_raise(rb_eArgError, "invalid format character - %%");
|
||||
|
|
Loading…
Add table
Reference in a new issue