From 5074a3d8b29978636c4f88670da7b64a44f37546 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 24 Jan 2019 21:44:34 +0000 Subject: [PATCH] Make unity.c compatible with c90 Avoid declaring the loop variable inside the for statement to keep compatibility with c90: unity.c:1408: error: for' loop initial declaration used outside C99 mode --- src/unity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unity.c b/src/unity.c index 38e7d68..be8dbc8 100644 --- a/src/unity.c +++ b/src/unity.c @@ -1523,8 +1523,9 @@ int UnityParseOptions(int argc, char** argv) { UnityOptionIncludeNamed = NULL; UnityOptionExcludeNamed = NULL; + int i; - for (int i = 1; i < argc; i++) + for (i = 1; i < argc; i++) { if (argv[i][0] == '-') {