From 65e227d03dc7d8d47db78fa7d713162c986fc0c9 Mon Sep 17 00:00:00 2001 From: jtsiomb 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: https://svn.code.sf.net/p/freeglut/code/trunk@1639 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/progs/demos/timer/timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/progs/demos/timer/timer.c b/freeglut/freeglut/progs/demos/timer/timer.c index 11557f7..5119870 100644 --- a/freeglut/freeglut/progs/demos/timer/timer.c +++ b/freeglut/freeglut/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 */