Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit] test: fix lj-1047-fix-funccw-arm64 compilation
@ 2026-12-04 12:20 Sergey Kaplun via Tarantool-patches
  2026-12-04 16:31 ` Evgeniy Temirgaleev via Tarantool-patches
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Kaplun via Tarantool-patches @ 2026-12-04 12:20 UTC (permalink / raw)
  To: Evgeniy Temirgaleev, Sergey Bronnikov; +Cc: tarantool-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-04 12:20 [Tarantool-patches] [PATCH luajit] test: fix lj-1047-fix-funccw-arm64 compilation Sergey Kaplun via Tarantool-patches
2026-12-04 16:31 ` Evgeniy Temirgaleev via Tarantool-patches

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