diff options
| author | Lua Team <team@lua.org> | 2013-03-21 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2013-03-21 12:00:00 +0000 |
| commit | dc27609467d2699ac9252e89d632432ac5f798f2 (patch) | |
| tree | b934d79a77a76df417078dc6ac162bb0012708bb /src/lbitlib.c | |
| parent | a101faf3e9db5b8b47cb0bcfb973b13d46ca304a (diff) | |
| download | lua-github-5.2.2.tar.gz | |
Diffstat (limited to 'src/lbitlib.c')
| -rw-r--r-- | src/lbitlib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lbitlib.c b/src/lbitlib.c index 9cd91474..9637532e 100644 --- a/src/lbitlib.c +++ b/src/lbitlib.c @@ -1,5 +1,5 @@ /* -** $Id: lbitlib.c,v 1.17 2013/02/21 13:44:53 roberto Exp $ +** $Id: lbitlib.c,v 1.18 2013/03/19 13:19:12 roberto Exp $ ** Standard library for bitwise operations ** See Copyright Notice in lua.h */ @@ -147,7 +147,9 @@ static int b_rrot (lua_State *L) { /* ** get field and width arguments for field-manipulation functions, -** checking whether they are valid +** checking whether they are valid. +** ('luaL_error' called without 'return' to avoid later warnings about +** 'width' being used uninitialized.) */ static int fieldargs (lua_State *L, int farg, int *width) { int f = luaL_checkint(L, farg); @@ -155,7 +157,7 @@ static int fieldargs (lua_State *L, int farg, int *width) { luaL_argcheck(L, 0 <= f, farg, "field cannot be negative"); luaL_argcheck(L, 0 < w, farg + 1, "width must be positive"); if (f + w > LUA_NBITS) - return luaL_error(L, "trying to access non-existent bits"); + luaL_error(L, "trying to access non-existent bits"); *width = w; return f; } |
