<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hello, Sergey,</p>
<p>Thanks for the patch! LGTM with a minor comment.</p>
<p>Sergey</p>
<div class="moz-cite-prefix">On 6/8/26 13:23, Sergey Kaplun wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20260608102318.4068317-1-skaplun@tarantool.org">
<pre wrap="" class="moz-quote-pre">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: <a class="moz-txt-link-freetext" href="https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-tests-old-gcc">https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-tests-old-gcc</a>
CI failure: <a class="moz-txt-link-freetext" href="https://github.com/tarantool/luajit/actions/runs/27124968515/job/80063067169#step:6:10593">https://github.com/tarantool/luajit/actions/runs/27124968515/job/80063067169#step:6:10593</a>
test/tarantool-tests/ffi-ccall/libfficcall.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/tarantool-tests/ffi-ccall/libfficcall.c b/test/tarantool-tests/ffi-ccall/libfficcall.c
index 2145b556..129bc75d 100644
--- a/test/tarantool-tests/ffi-ccall/libfficcall.c
+++ b/test/tarantool-tests/ffi-ccall/libfficcall.c
@@ -307,7 +307,8 @@ int test_2_large_agg_a16(int x, large_agg_a16 s1, large_agg_a16 s2)
const int *v1 = s1.v;
const int *v2 = s2.v;
int sum = x;
- for (int i = 0; i < lengthof(s1.v); i++) {
+ int i = 0;
+ for (; i < lengthof(s1.v); i++) {</pre>
</blockquote>
<p>isn't better declaring outside the loop and define in a loop?</p>
<pre wrap="" class="moz-quote-pre">int i;
for (i = 0; i < lengthof(s1.v); i++) {
<span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
class="ryNqvb">It looks more familiar this way. </span></span></span><span
style="white-space: normal">Feel free to ignore. </span></pre>
<blockquote type="cite"
cite="mid:20260608102318.4068317-1-skaplun@tarantool.org">
<pre wrap="" class="moz-quote-pre">
sum += v1[i] + v2[i];
}
return sum;
</pre>
</blockquote>
</body>
<lt-container></lt-container>
</html>