From 0573159b84a69b535a6cc8b6e33b713718415784 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 8 Jan 2016 11:23:21 +0000 Subject: [PATCH] Fix TestBatchMode for gcc gcc by default does not accept for loop declarations in C files (one must choose C99 mode first, which we don't). Place the declaration outside the loop, to make this code more conformant. llvm-svn: 257166 --- lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c index ff478a8ae465..c1f1651e75e0 100644 --- a/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c +++ b/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c @@ -25,7 +25,8 @@ main (int argc, char **argv) int do_crash = 0; int do_wait = 0; - for (int idx = 1; idx < argc; idx++) + int idx; + for (idx = 1; idx < argc; idx++) { if (strcmp(argv[idx], "CRASH") == 0) do_crash = 1;