From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 0246F4696C3 for ; Tue, 7 Apr 2020 18:39:15 +0300 (MSK) Date: Tue, 7 Apr 2020 18:39:13 +0300 From: Sergey Bronnikov Message-ID: <20200407153913.GC5989@pony.bronevichok.ru> References: <20200403093902.GA42848@pony.bronevichok.ru> <141ac7a3-45c6-a720-a400-d3d699443550@tarantool.org> <20200406093343.GB20529@pony.bronevichok.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200406093343.GB20529@pony.bronevichok.ru> Subject: Re: [Tarantool-patches] [PATCH] Fix luacheck warnings in src/lua/*.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Babin , tarantool-patches@dev.tarantool.org Oleg, On 12:33 Mon 06 Apr , Sergey Bronnikov wrote: > > On 03/04/2020 12:39, Sergey Bronnikov wrote: > > > diff --git a/src/lua/tap.lua b/src/lua/tap.lua > > > index 94b080d5a..04497386e 100644 > > > --- a/src/lua/tap.lua > > > +++ b/src/lua/tap.lua > > > @@ -53,7 +53,7 @@ local function ok(test, cond, message, extra) > > > io.write(string.format("not ok - %s\n", message)) > > > extra = extra or {} > > > if test.trace then > > > - local frame = debug.getinfo(3, "Sl") > > > + debug.getinfo(3, "Sl") > > > > I think debug.getinfo() could be completely removed. It doesn't change any > > state it only returns some debug information that is completely unused. > > This patch is about fixing warnings produced by luacheck, > Proposed change doesn't relate to Lua static analysis, so I suggest > to make it in a separate patch. I was wrong, 'frame' is unused here and can be removed, Vlad Sh. also reminded me about it.