From 3e0ae8582af75a0f40f767379db4f003889a602b Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Tue, 21 Jan 2014 10:50:05 +0000 Subject: [PATCH] fixed timer.c: wouldn't compile in C89 mode due to recent change which added two for loops with a loop variable declared in the statement itself. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1639 7f0cb862-5218-0410-a997-914c9d46530a --- progs/demos/timer/timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/progs/demos/timer/timer.c b/progs/demos/timer/timer.c index 11557f7..5119870 100644 --- a/progs/demos/timer/timer.c +++ b/progs/demos/timer/timer.c @@ -34,7 +34,8 @@ int menuID, subMenuSurround, subMenuCenter; void createMenuEntries(int which) { - for (int i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++) + int i; + for (i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++) { char temp[10] = {'\0'}; /* flag current value */ @@ -51,7 +52,8 @@ void createMenuEntries(int which) void updateMenuEntries(int which) { - for (int i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++) + int i; + for (i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++) { char temp[10] = { '\0' }; /* flag current value */ -- 1.7.10.4