From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 36973469710 for ; Thu, 28 May 2020 14:20:54 +0300 (MSK) Date: Thu, 28 May 2020 14:19:57 +0300 From: Sergey Bronnikov Message-ID: <20200528111957.GD5970@pony.bronevichok.ru> References: <1e2b03cc52bafcf0f6088f8bdf556ff481725149.1589275364.git.sergeyb@tarantool.org> <20200527165431.GB21558@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200527165431.GB21558@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v5 07/10] Fix luacheck warnings in src/box/lua/ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Igor, thanks for review! All issues mentioned below fixed in a branch. On 19:54 Wed 27 May , Igor Munkin wrote: > Sergey, > > Thanks, the patch LGTM except several nits I left below. > > On 12.05.20, sergeyb@tarantool.org wrote: > > From: Sergey Bronnikov > > > > Closes #4681 > > > > Reviewed-by: Vladislav Shpilevoy > > Co-authored-by: Vladislav Shpilevoy > > --- > > src/box/lua/console.lua | 6 ++-- > > src/box/lua/feedback_daemon.lua | 2 +- > > src/box/lua/key_def.lua | 2 +- > > src/box/lua/load_cfg.lua | 31 ++++++++++--------- > > src/box/lua/net_box.lua | 53 +++++++++++++-------------------- > > src/box/lua/schema.lua | 50 +++++++++++++++---------------- > > src/box/lua/tuple.lua | 8 ++--- > > src/box/lua/upgrade.lua | 19 ++++++------ > > 8 files changed, 78 insertions(+), 93 deletions(-) > > > > > > > diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua > > index 9560bfdd4..3f2a9df81 100644 > > --- a/src/box/lua/net_box.lua > > +++ b/src/box/lua/net_box.lua > > > > > @@ -253,7 +249,7 @@ local function on_push_sync_default(...) end > > -- > > -- The following events are delivered, with arguments: > > -- > > --- 'state_changed', state, errno, error > > +-- 'state_changed', state, errno > > Typo: s/errno/error/ since you removed the third argument. > > > -- 'handshake', greeting -> nil (accept) / errno, error (reject) > > -- 'will_fetch_schema' -> true (approve) / false (skip fetch) > > -- 'did_fetch_schema', schema_version, spaces, indices > > > > > @@ -795,13 +791,12 @@ local function create_transport(host, port, user, password, callback, > > return iproto_schema_sm() > > end > > encode_auth(send_buf, new_request_id(), user, password, salt) > > - local err, hdr, body_rpos, body_end = send_and_recv_iproto() > > + local err, hdr, body_rpos = send_and_recv_iproto() > > if err then > > return error_sm(err, hdr) > > end > > if hdr[IPROTO_STATUS_KEY] ~= 0 then > > - local body > > - body, body_end = decode(body_rpos) > > + local body, _ = decode(body_rpos) > > Underscore variable is excess here (see v4 review[1]). > > > return error_sm(E_NO_CONNECTION, body[IPROTO_ERROR_24]) > > end > > set_state('fetch_schema') > > @@ -852,8 +847,7 @@ local function create_transport(host, port, user, password, callback, > > peer_has_vcollation = false > > goto continue > > end > > - local body > > - body, body_end = decode(body_rpos) > > + local body, _ = decode(body_rpos) > > Underscore variable is excess here (see v4 review[1]). > > > return error_sm(E_NO_CONNECTION, body[IPROTO_ERROR_24]) > > end > > if schema_version == nil then > > > > > -- > > 2.23.0 > > > > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016316.html > > -- > Best regards, > IM