From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 12AFB469710 for ; Thu, 7 May 2020 17:34:48 +0300 (MSK) Date: Thu, 7 May 2020 17:34:27 +0300 From: Sergey Bronnikov Message-ID: <20200507143427.GA90708@pony.bronevichok.ru> References: <20200423225427.GC11314@tarantool.org> <20200507103255.GA34300@pony.bronevichok.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200507103255.GA34300@pony.bronevichok.ru> Subject: Re: [Tarantool-patches] [PATCH v4 5/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, v.shpilevoy@tarantool.org On 13:32 Thu 07 May , Sergey Bronnikov wrote: > > > diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua > > > index 85fcca562..de47b807e 100644 > > > --- a/src/box/lua/schema.lua > > > +++ b/src/box/lua/schema.lua > > > > > > > > > @@ -582,9 +580,9 @@ end > > > -- > > > local function format_field_resolve(format, path, what) > > > assert(type(path) == 'number' or type(path) == 'string') > > > - local idx = nil > > > + local idx > > > local relative_path = nil > > > - local field_name = nil > > > + local field_name > > > > You can simply move it down to its initialization. > > Done reverted, because change broke tests -- sergeyb@