From 9c9fb503a8a5ffce9eae4b48cce4b06d41146fc1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 7 May 2016 19:51:36 -0700 Subject: fix relooper fuzz testcase to be valid old-style c (#459) --- test/example/relooper-fuzz.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'test/example/relooper-fuzz.c') diff --git a/test/example/relooper-fuzz.c b/test/example/relooper-fuzz.c index ba9bcb3ed..cfd10a9b3 100644 --- a/test/example/relooper-fuzz.c +++ b/test/example/relooper-fuzz.c @@ -229,12 +229,15 @@ int main() { BinaryenExpressionRef full[numDecisions + 1]; // write out all the decisions, then the body of the function - for (int i = 0; i < numDecisions; i++) { - full[i] = BinaryenStore(module, - 4, 0, 0, - BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)), - BinaryenConst(module, BinaryenLiteralInt32(decisions[i])) - ); + { + int i; + for (i = 0; i < numDecisions; i++) { + full[i] = BinaryenStore(module, + 4, 0, 0, + BinaryenConst(module, BinaryenLiteralInt32(8 + 4 * i)), + BinaryenConst(module, BinaryenLiteralInt32(decisions[i])) + ); + } } full[numDecisions] = body; BinaryenExpressionRef all = BinaryenBlock(module, NULL, full, numDecisions + 1); -- cgit v1.2.3