summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-01-08 11:23:21 +0000
committerPavel Labath <labath@google.com>2016-01-08 11:23:21 +0000
commit0573159b84a69b535a6cc8b6e33b713718415784 (patch)
treeeacceeb6b730c5a6c459f1505e6d12ae673067e0 /lldb
parentfa42a837735ad3b18401ccdbb244170d0067e924 (diff)
downloadbcm5719-llvm-0573159b84a69b535a6cc8b6e33b713718415784.tar.gz
bcm5719-llvm-0573159b84a69b535a6cc8b6e33b713718415784.zip
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
Diffstat (limited to 'lldb')
-rw-r--r--lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c3
1 files changed, 2 insertions, 1 deletions
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 ff478a8ae46..c1f1651e75e 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;
OpenPOWER on IntegriCloud