From c12983cf8afac4c4c757b84aaddab1935a931641 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 25 Oct 2019 17:41:40 -0300 Subject: [PATCH] Fixed warnings from Keil compiler --- lcode.c | 2 +- lvm.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lcode.c b/lcode.c index 3e4c5b49..2432b346 100644 --- a/lcode.c +++ b/lcode.c @@ -110,7 +110,7 @@ int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v) { ** optimizations). */ static Instruction *previousinstruction (FuncState *fs) { - static const Instruction invalidinstruction = -1; + static const Instruction invalidinstruction = ~(Instruction)0; if (fs->pc > fs->lasttarget) return &fs->f->code[fs->pc - 1]; /* previous instruction */ else diff --git a/lvm.c b/lvm.c index e22a0da8..5407d144 100644 --- a/lvm.c +++ b/lvm.c @@ -1561,12 +1561,9 @@ void luaV_execute (lua_State *L, CallInfo *ci) { luaD_poscall(L, ci, cast_int(L->top - ra)); return; } - else { /* Lua tail call */ - ci->func -= delta; - luaD_pretailcall(L, ci, ra, b); /* prepare call frame */ - goto tailcall; - } - vmbreak; + ci->func -= delta; + luaD_pretailcall(L, ci, ra, b); /* prepare call frame */ + goto tailcall; } vmcase(OP_RETURN) { int n = GETARG_B(i) - 1; /* number of results */