Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>,
	Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH luajit] test: fix lj-1047-fix-funccw-arm64 compilation
Date: Fri,  4 Dec 2026 15:20:00 +0300	[thread overview]
Message-ID: <20261204122000.1909879-1-skaplun@tarantool.org> (raw)

On CentOS 7 GCC has no std=c99 by default. This leads to compilation
warnings and errors for ‘for’ loop initial declarations. This patch
fixes that by declaring the variable out of the loop body.
---

Branch: https://github.com/tarantool/luajit/tree/skaplun/test-fix-funccw-gcc-7
Example of failed run: https://github.com/tarantool/luajit/actions/runs/47296804534/job/144918247461#step:6:11575

 test/tarantool-c-tests/lj-1047-fix-funccw-arm64.test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/tarantool-c-tests/lj-1047-fix-funccw-arm64.test.c b/test/tarantool-c-tests/lj-1047-fix-funccw-arm64.test.c
index 0c9b8794..08e8fa00 100644
--- a/test/tarantool-c-tests/lj-1047-fix-funccw-arm64.test.c
+++ b/test/tarantool-c-tests/lj-1047-fix-funccw-arm64.test.c
@@ -24,7 +24,8 @@ static int is_called = 0;
 static int push_minstack(lua_State *L)
 {
 	is_called = 1;
-	for (int i = 0; i < LUA_MINSTACK; i++)
+	int i;
+	for (i = 0; i < LUA_MINSTACK; i++)
 		lua_pushinteger(L, i);
 	return LUA_MINSTACK;
 }
-- 
2.56.1


             reply	other threads:[~2026-12-04 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:20 Sergey Kaplun via Tarantool-patches [this message]
2026-12-04 16:31 ` Evgeniy Temirgaleev via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204122000.1909879-1-skaplun@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=e.temirgaleev@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] test: fix lj-1047-fix-funccw-arm64 compilation' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox