diff options
Diffstat (limited to 'src/mpack/lmpack.c')
-rw-r--r-- | src/mpack/lmpack.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mpack/lmpack.c b/src/mpack/lmpack.c index 99207246c8..24d27fd17a 100644 --- a/src/mpack/lmpack.c +++ b/src/mpack/lmpack.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + /* * This module exports three classes, and each instance of those classes has its * own private registry for temporary reference storage(keeping state between @@ -201,14 +204,14 @@ static void lmpack_pushnil(lua_State *L) static mpack_uint32_t lmpack_objlen(lua_State *L, int *is_array) { size_t len, max; - int isarr, type; + int isarr; lua_Number n; #ifndef NDEBUG int top = lua_gettop(L); assert(top); #endif - if ((type = lua_type(L, -1)) != LUA_TTABLE) { + if ((lua_type(L, -1)) != LUA_TTABLE) { #if LUA_VERSION_NUM >= 502 len = lua_rawlen(L, -1); #elif LUA_VERSION_NUM == 501 @@ -442,7 +445,6 @@ static int lmpack_unpacker_unpack_str(lua_State *L, Unpacker *unpacker, if (rv == MPACK_NOMEM) { unpacker->parser = lmpack_grow_parser(unpacker->parser); if (!unpacker->parser) { - unpacker->unpacking = 0; return luaL_error(L, "failed to grow Unpacker capacity"); } } @@ -796,7 +798,6 @@ static int lmpack_packer_pack(lua_State *L) if (result == MPACK_NOMEM) { packer->parser = lmpack_grow_parser(packer->parser); if (!packer->parser) { - packer->packing = 0; return luaL_error(L, "Failed to grow Packer capacity"); } } |