1
0
Fork 0
forked from len0rd/rockbox

misc: Properly annotate some intentional case fallthroughs

Change-Id: Ie758f17fefac72aca1aa28a8ba1126b9334fe134
This commit is contained in:
Solomon Peachy 2025-04-22 20:45:45 -04:00
parent 83950bf233
commit 5b1158e64a
9 changed files with 13 additions and 9 deletions

View file

@ -254,6 +254,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
len += f->sizelineinfo;
f->packedlineinfo = luaM_freearray(L, f->packedlineinfo, f->sizelineinfo, unsigned char);
f->sizelineinfo = 0;
/* fallthrough */
case 2:
len += f->sizelocvars * (sizeof(struct LocVar) + sizeof(dummy->tsv) + sizeof(struct LocVar *));
f->locvars = luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);
@ -262,6 +263,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
f->sizeupvalues * (sizeof(dummy->tsv) + sizeof(TString *));
f->sizelocvars = 0;
f->sizeupvalues = 0;
/* fallthrough */
case 1:
default:
break;
@ -510,7 +512,7 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
case OP_FORLOOP:
case OP_FORPREP:
checkreg(pt, a+3);
/* go through */
/* fallthrough */
case OP_JMP: {
int dest = pc+1+b;
/* not full check and jump is forward and do not skip `lastpc'? */
@ -733,4 +735,3 @@ void luaG_runerror (lua_State *L, const char *fmt, ...) {
va_end(argp);
luaG_errormsg(L);
}