diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-28 15:25:16 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-28 15:25:16 -0200 |
commit | 8119374e7458073372408ccb8929ffb96537e411 (patch) | |
tree | 6a9bf48389965ac076a611c7b7586277dce8f653 | |
parent | 3a997eefb5b329fc7bc5de5a16f8d78cd6b6dcdc (diff) | |
download | lua-8119374e7458073372408ccb8929ffb96537e411.tar.gz lua-8119374e7458073372408ccb8929ffb96537e411.tar.bz2 lua-8119374e7458073372408ccb8929ffb96537e411.zip |
avoid warnings of unreacheable 'break's
-rw-r--r-- | lvm.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.143 2011/08/17 20:26:47 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.144 2011/10/07 20:45:19 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -515,6 +515,7 @@ void luaV_finishOp (lua_State *L) { | |||
515 | 515 | ||
516 | #define vmdispatch(o) switch(o) | 516 | #define vmdispatch(o) switch(o) |
517 | #define vmcase(l,b) case l: {b} break; | 517 | #define vmcase(l,b) case l: {b} break; |
518 | #define vmcasenb(l,b) case l: {b} /* nb = no break */ | ||
518 | 519 | ||
519 | void luaV_execute (lua_State *L) { | 520 | void luaV_execute (lua_State *L) { |
520 | CallInfo *ci = L->ci; | 521 | CallInfo *ci = L->ci; |
@@ -741,7 +742,7 @@ void luaV_execute (lua_State *L) { | |||
741 | goto newframe; /* restart luaV_execute over new Lua function */ | 742 | goto newframe; /* restart luaV_execute over new Lua function */ |
742 | } | 743 | } |
743 | ) | 744 | ) |
744 | vmcase(OP_RETURN, | 745 | vmcasenb(OP_RETURN, |
745 | int b = GETARG_B(i); | 746 | int b = GETARG_B(i); |
746 | if (b != 0) L->top = ra+b-1; | 747 | if (b != 0) L->top = ra+b-1; |
747 | if (cl->p->sizep > 0) luaF_close(L, base); | 748 | if (cl->p->sizep > 0) luaF_close(L, base); |
@@ -780,7 +781,7 @@ void luaV_execute (lua_State *L) { | |||
780 | setnvalue(ra, luai_numsub(L, nvalue(ra), nvalue(pstep))); | 781 | setnvalue(ra, luai_numsub(L, nvalue(ra), nvalue(pstep))); |
781 | ci->u.l.savedpc += GETARG_sBx(i); | 782 | ci->u.l.savedpc += GETARG_sBx(i); |
782 | ) | 783 | ) |
783 | vmcase(OP_TFORCALL, | 784 | vmcasenb(OP_TFORCALL, |
784 | StkId cb = ra + 3; /* call base */ | 785 | StkId cb = ra + 3; /* call base */ |
785 | setobjs2s(L, cb+2, ra+2); | 786 | setobjs2s(L, cb+2, ra+2); |
786 | setobjs2s(L, cb+1, ra+1); | 787 | setobjs2s(L, cb+1, ra+1); |