From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 974B16EC5C; Fri, 29 Jan 2021 19:32:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 974B16EC5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611937955; bh=1fyVR759TzqxWgEzo4lrJOStOvCBWEIVLz9Pc+BLgl4=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=e5vG7+4KA5we8tDoA955YlBfhdKw2feMrqTEpwJgL/JIGz9zVUe6rEX209CKufBXL rMMir/hw1sC6vdBqsmtMIicSQAyedxOiKWdg57qHMVXNOA347qOcQZR+4LJbBePD+z 5aewl4D0hnd8hussmZemyQd4d+TnGwN59yvFBLD0= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 D10056EC5C for ; Fri, 29 Jan 2021 19:32:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D10056EC5C Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l5WhE-0006ot-UO; Fri, 29 Jan 2021 19:32:33 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org References: <316462e217117629e781d7aff533741763005b2c.1611232655.git.sergeyb@tarantool.org> <84e3a15c-8bae-1384-04f4-c2b1ce67d67a@tarantool.org> Message-ID: <47f8a81f-9280-2b6d-4916-f92304593c03@tarantool.org> Date: Fri, 29 Jan 2021 19:32:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <84e3a15c-8bae-1384-04f4-c2b1ce67d67a@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CAEF2BF42A2A772939F9DC26A9E76AF69182A05F538085040B84047A6DE75A53BF6FEE28D5331D38253D70BE582178538EB6ED830EAA63761 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72E0BB8D059315229EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637963FCF4A2EF6E1A88638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC5E544B2C40DA4DC1A50680A0BF55F17AF9124FA927A914B9389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D082881546D93491CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC35E6A44349193C7075ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE493B89ED3C7A6281781B7122A4C44A4E42FC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5E162B78B23723C349B7B0D68699A8349D193476E46EA9B7AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AF61ACC197BF517A85F2DE2B52B0D1DE3247953B1B59A5E8564F2A0F9904025A78800461F955672C1D7E09C32AA3244CA509A4C420C889AF8A15176254047CCE64EE5813BBCA3A9DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj0axADxPFAF+tDP5Ej5vmrQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382285F639EA2010B29AEE66CC51582D4566DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v8 06/14] test: fix laucheck warnings W213 in test/sql-tap X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for review! On 24.01.2021 20:35, Vladislav Shpilevoy wrote: > Thanks for the patch! > > On 21.01.2021 13:50, sergeyb@tarantool.org wrote: >> From: Sergey Bronnikov >> >> W213 (Unused loop variable) >> >> Part of #5464 >> --- >> diff --git a/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua b/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua >> index 0b7c3ca32..57302811b 100755 >> --- a/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua >> +++ b/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua >> @@ -12,7 +12,7 @@ test:do_test( >> box.execute("insert into test(id, k) values(" .. i .. "," .. i .. ")") >> end >> >> - for i = 1, 10000 do >> + for i = 1, 10000 do -- luacheck: ignore unused i > Why do you ignore it here, and replace with _ in some other places? replaced with _ in other places too --- a/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua +++ b/test/sql-tap/gh-3083-ephemeral-unref-tuples.test.lua @@ -12,7 +12,7 @@ test:do_test(                         box.execute("insert into test(id, k) values(" .. i .. "," .. i .. ")")                 end -               for i = 1, 10000 do -- luacheck: ignore unused i +               for _ = 1, 10000 do                         box.execute("SELECT id, k FROM test WHERE k IN (5849, 4986, 4997, 5020, 5044, 4990, 5013, 4983)")                 end         end, { diff --git a/test/sql-tap/gh-3332-tuple-format-leak.test.lua b/test/sql-tap/gh-3332-tuple-format-leak.test.lua index 48c6268cf..5285cfa28 100755 --- a/test/sql-tap/gh-3332-tuple-format-leak.test.lua +++ b/test/sql-tap/gh-3332-tuple-format-leak.test.lua @@ -21,7 +21,7 @@ test:do_test(  test:do_test(      "format-leak",      function() -        for i = 1, 100000 do -- luacheck: ignore unused i +        for _ = 1, 100000 do              box.execute("SELECT id FROM t1 WHERE flags=3 ORDER BY id LIMIT 2");          end      end, { diff --git a/test/sql-tap/gh2127-indentifier-max-length.test.lua b/test/sql-tap/gh2127-indentifier-max-length.test.lua index bab70b714..33d22b50a 100755 --- a/test/sql-tap/gh2127-indentifier-max-length.test.lua +++ b/test/sql-tap/gh2127-indentifier-max-length.test.lua @@ -7,7 +7,7 @@ local tt = {}  local table_word = "<90><90><90><90><90><90><90><90><90><90>"  -- Create 30kb table name -for i=1,300 do -- luacheck: ignore unused i +for _=1,300 do         table.insert(tt, table_word)  end @@ -27,7 +27,7 @@ local vt = {}  local view_word = "BBBBBBBBBB"  -- Create 30kb view name -for i=1, 300 do -- luacheck: ignore unused i +for _=1, 300 do         table.insert(vt, view_word)  end @@ -45,7 +45,7 @@ local it = {}  local index_word = "<95><95><95><95><95><95><95><95><95><95>"  -- Create 30kb index name -for i=1, 300 do -- luacheck: ignore unused i +for _=1, 300 do         table.insert(it, index_word)  end @@ -55,7 +55,7 @@ local field_table = {}  local field_word = '<94><94><94><94><94><94><94><94><94>'  -- Create 30kb field name -for i=1, 300 do -- luacheck: ignore unused i +for _=1, 300 do         table.insert(field_table, field_word)  end @@ -75,7 +75,7 @@ test:do_execsql_test(  local trig_table = {}  local trigger_word = "" -for i=1, 300 do -- luacheck: ignore unused i +for _=1, 300 do         table.insert(trig_table, trigger_word)  end --- a/test/sql-tap/lua/sqltester.lua +++ b/test/sql-tap/lua/sqltester.lua @@ -272,7 +272,7 @@ test.catchsql2 = catchsql2  -- that different SQL statements generate exactly the same VDBE code.  local function explain_no_trace(self, sql)      local tr = execsql(self, "EXPLAIN "..sql) -    for i=1,8 do -- luacheck: ignore unused i +    for _=1,8 do          table.remove(tr,1)      end      return tr diff --git a/test/sql-tap/misc5.test.lua b/test/sql-tap/misc5.test.lua index 62678bbbd..4e7f006d7 100755 --- a/test/sql-tap/misc5.test.lua +++ b/test/sql-tap/misc5.test.lua @@ -292,7 +292,7 @@ test:do_test(          local sql, tail          sql = "INSERT INTO t1 VALUES("          tail = "" -        for i = 0, 199, 1 do -- luacheck: ignore unused i +        for _ = 0, 199, 1 do              sql = sql .. "(1+"              tail = tail .. ")"          end diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua index d1301e5ad..35fcd8aec 100755 --- a/test/sql-tap/select1.test.lua +++ b/test/sql-tap/select1.test.lua @@ -1974,7 +1974,7 @@ test:do_test(              START TRANSACTION;              INSERT INTO abc VALUES(1, 1, 1);          ]] -        for i = 0,9,1 do -- luacheck: ignore unused i +        for _ = 0,9,1 do              test:execsql [[                  INSERT INTO abc SELECT a+(select max(a) FROM abc), b+(select max(a) FROM abc), c+(select max(a) FROM abc) FROM abc;              ]]