Fix switch fallthrough warnings/errors

This commit is contained in:
Nicolas Williams
2020-08-06 11:48:48 -05:00
parent 7d50445d1b
commit fdc13c4aac
4 changed files with 11 additions and 2 deletions

View File

@@ -205,14 +205,18 @@ wind_ucs4utf8(const uint32_t *in, size_t in_len, char *out, size_t *out_len)
case 4:
out[3] = (ch | 0x80) & 0xbf;
ch = ch >> 6;
/* FALLTHROUGH */
case 3:
out[2] = (ch | 0x80) & 0xbf;
ch = ch >> 6;
/* FALLTHROUGH */
case 2:
out[1] = (ch | 0x80) & 0xbf;
ch = ch >> 6;
/* FALLTHROUGH */
case 1:
out[0] = ch | first_char[len - 1];
/* FALLTHROUGH */
}
}
out += len;
@@ -480,11 +484,14 @@ wind_ucs2utf8(const uint16_t *in, size_t in_len, char *out, size_t *out_len)
case 3:
out[2] = (ch | 0x80) & 0xbf;
ch = ch >> 6;
/* FALLTHROUGH */
case 2:
out[1] = (ch | 0x80) & 0xbf;
ch = ch >> 6;
/* FALLTHROUGH */
case 1:
out[0] = ch | first_char[len - 1];
/* FALLTHROUGH */
}
out += len;
}