From 0c7738240ef81b88ded842e3a8ebfb3180bcf00c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 16 Mar 2018 11:22:09 -0300 Subject: [PATCH] FALLTHROUGH comment must be last "statement" (so it does not work when inside a block) --- lcode.c | 5 ++--- lgc.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lcode.c b/lcode.c index 95e87f31..661c7916 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.158 2018/02/26 14:16:05 roberto Exp roberto $ +** $Id: lcode.c,v 2.159 2018/03/07 15:55:38 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -1696,8 +1696,7 @@ void luaK_finish (FuncState *fs) { break; /* no extra work */ /* else use OP_RETURN to do the extra work */ SET_OPCODE(*pc, OP_RETURN); - /* FALLTHROUGH */ - } + } /* FALLTHROUGH */ case OP_RETURN: case OP_TAILCALL: { if (p->sizep > 0 || p->is_vararg) { SETARG_C(*pc, p->is_vararg ? p->numparams + 1 : 0); diff --git a/lgc.c b/lgc.c index 9da0f498..2e401cbd 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.251 2018/02/23 13:21:27 roberto Exp roberto $ +** $Id: lgc.c,v 2.252 2018/02/26 13:35:03 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -301,8 +301,8 @@ static void reallymarkobject (global_State *g, GCObject *o) { gray2black(o); /* nothing else to mark */ break; } - /* else *//* FALLTHROUGH */ - } + /* else... */ + } /* FALLTHROUGH */ case LUA_TLCL: case LUA_TCCL: case LUA_TTABLE: case LUA_TTHREAD: case LUA_TPROTO: { linkobjgclist(o, g->gray);