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
This commit is contained in:
Pavel Labath 2016-01-08 11:23:21 +00:00
parent fa42a83773
commit 0573159b84
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,8 @@ main (int argc, char **argv)
int do_crash = 0; int do_crash = 0;
int do_wait = 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) if (strcmp(argv[idx], "CRASH") == 0)
do_crash = 1; do_crash = 1;