Skip to content

Commit e4a5f6f

Browse files
author
rhyskidd
committed
Fix r15302 for early gcc compilers on OS X. Cannot declare variable in for loop pre C99. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15310 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 parent 41d3053 commit e4a5f6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

none/tests/darwin/bug228343.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ static void EnableSigprof(Sigaction SignalHandler) {
3333
}
3434

3535
void *Worker() {
36-
for (long int i = 0; i < 100000000; i++) {
36+
long int i;
37+
for (i = 0; i < 100000000; i++) {
3738
void *x = malloc((i % 64) + 1);
3839
free (x);
3940
}

0 commit comments

Comments
 (0)