Thread (79 messages) 79 messages, 3 authors, 2022-09-05
STALE1377d

[PATCH 2/5] test-parse-options.c: don't use for loop initial declaration

From: SZEDER Gábor <hidden>
Date: 2022-09-05 18:50:21
Subsystem: the rest · Maintainer: Linus Torvalds

We would like to eventually use for loop initial declarations in our
codebase, but we are not there yet.

Signed-off-by: SZEDER Gábor <redacted>
---
 t/helper/test-parse-options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c
index aa0ad45851..9fe8ce66cb 100644
--- a/t/helper/test-parse-options.c
+++ b/t/helper/test-parse-options.c
@@ -195,7 +195,8 @@ int cmd__parse_options(int argc, const char **argv)
 
 static void print_args(int argc, const char **argv)
 {
-	for (int i = 0; i < argc; i++)
+	int i;
+	for (i = 0; i < argc; i++)
 		printf("arg %02d: %s\n", i, argv[i]);
 }
 
-- 
2.37.3.989.g4c3dfb3304
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help