diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-27 14:39:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-27 14:39:56 -0300 |
commit | c31f02948fb4431e2639948557dc5501fa1877b9 (patch) | |
tree | 3663dcb4a593c93c448f5b6ede4cf230a2b9a20d | |
parent | c9f91c6fe300c77022216856bc49552d9d75f26d (diff) | |
download | lua-c31f02948fb4431e2639948557dc5501fa1877b9.tar.gz lua-c31f02948fb4431e2639948557dc5501fa1877b9.tar.bz2 lua-c31f02948fb4431e2639948557dc5501fa1877b9.zip |
[C++ Warning] lparser.c(326): W8066 Unreachable code.
[C++ Warning] lparser.c(486): W8004 'nargs' is assigned a value that is never used.
-rw-r--r-- | lparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.81 2000/04/11 18:37:18 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.82 2000/04/12 18:57:19 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -323,7 +323,6 @@ static int getvarname (LexState *ls, expdesc *var) { | |||
323 | return var->u.index; | 323 | return var->u.index; |
324 | case VLOCAL: | 324 | case VLOCAL: |
325 | return string_constant(ls->fs, ls->fs->localvar[var->u.index]); | 325 | return string_constant(ls->fs, ls->fs->localvar[var->u.index]); |
326 | break; | ||
327 | default: | 326 | default: |
328 | error_unexpected(ls); /* there is no `var name' */ | 327 | error_unexpected(ls); /* there is no `var name' */ |
329 | return 0; /* to avoid warnings */ | 328 | return 0; /* to avoid warnings */ |
@@ -481,6 +480,8 @@ static void funcargs (LexState *ls, int slf) { | |||
481 | #ifdef LUA_COMPAT_ARGRET | 480 | #ifdef LUA_COMPAT_ARGRET |
482 | if (nargs > 0) /* arg list is not empty? */ | 481 | if (nargs > 0) /* arg list is not empty? */ |
483 | luaK_setcallreturns(fs, 1); /* last call returns only 1 value */ | 482 | luaK_setcallreturns(fs, 1); /* last call returns only 1 value */ |
483 | #else | ||
484 | UNUSED(nargs); /* to avoid warnings */ | ||
484 | #endif | 485 | #endif |
485 | break; | 486 | break; |
486 | } | 487 | } |