aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2026-05-08 15:01:59 -0300
committerRoberto I <roberto@inf.puc-rio.br>2026-05-08 15:01:59 -0300
commit53b41d0cddd80bf33fdc631bdd32e3ba53842b89 (patch)
tree70c70fe016126b5171afabd8d02f6d7aafdbada0
parent36c1f6d949a4d3dfcbe898d80b1be1efe8e5325c (diff)
downloadlua-53b41d0cddd80bf33fdc631bdd32e3ba53842b89.tar.gz
lua-53b41d0cddd80bf33fdc631bdd32e3ba53842b89.tar.bz2
lua-53b41d0cddd80bf33fdc631bdd32e3ba53842b89.zip
Avoid warning in some compilers
In function 'funcargs', some compilers can complain that 'args' can be used unitialized, due to the default case (syntax error).
-rw-r--r--lparser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lparser.c b/lparser.c
index 1850d6dc..af2b64d1 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1166,6 +1166,7 @@ static void funcargs (LexState *ls, expdesc *f) {
1166 } 1166 }
1167 default: { 1167 default: {
1168 luaX_syntaxerror(ls, "function arguments expected"); 1168 luaX_syntaxerror(ls, "function arguments expected");
1169 return; /* to avoid warnings */
1169 } 1170 }
1170 } 1171 }
1171 lua_assert(f->k == VNONRELOC); 1172 lua_assert(f->k == VNONRELOC);