aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-03-14 09:40:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-03-14 09:40:44 -0300
commit1a1b2f3d7f321dd6f28118c985986940b189c635 (patch)
tree14cffeb82724b5673ded4e9a3c5bde7f53e065d3 /lstrlib.c
parentf5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 (diff)
downloadlua-1a1b2f3d7f321dd6f28118c985986940b189c635.tar.gz
lua-1a1b2f3d7f321dd6f28118c985986940b189c635.tar.bz2
lua-1a1b2f3d7f321dd6f28118c985986940b189c635.zip
added 'return' to calls to 'luaL_error' (to signal to the compiler
that the function cannot continue past that call)
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 934b7db8..6ed2bdb8 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.253 2016/12/20 18:37:00 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.254 2016/12/22 13:08:50 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -879,7 +879,7 @@ static int lua_number2strx (lua_State *L, char *buff, int sz,
879 buff[i] = toupper(uchar(buff[i])); 879 buff[i] = toupper(uchar(buff[i]));
880 } 880 }
881 else if (fmt[SIZELENMOD] != 'a') 881 else if (fmt[SIZELENMOD] != 'a')
882 luaL_error(L, "modifiers for format '%%a'/'%%A' not implemented"); 882 return luaL_error(L, "modifiers for format '%%a'/'%%A' not implemented");
883 return n; 883 return n;
884} 884}
885 885
@@ -1199,8 +1199,8 @@ static int getnum (const char **fmt, int df) {
1199static int getnumlimit (Header *h, const char **fmt, int df) { 1199static int getnumlimit (Header *h, const char **fmt, int df) {
1200 int sz = getnum(fmt, df); 1200 int sz = getnum(fmt, df);
1201 if (sz > MAXINTSIZE || sz <= 0) 1201 if (sz > MAXINTSIZE || sz <= 0)
1202 luaL_error(h->L, "integral size (%d) out of limits [1,%d]", 1202 return luaL_error(h->L, "integral size (%d) out of limits [1,%d]",
1203 sz, MAXINTSIZE); 1203 sz, MAXINTSIZE);
1204 return sz; 1204 return sz;
1205} 1205}
1206 1206