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
This commit is contained in:
jtsiomb 2014-01-21 10:50:05 +00:00
parent 2bbf66ef98
commit 65e227d03d

View File

@ -34,7 +34,8 @@ int menuID, subMenuSurround, subMenuCenter;
void createMenuEntries(int which) 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'}; char temp[10] = {'\0'};
/* flag current value */ /* flag current value */
@ -51,7 +52,8 @@ void createMenuEntries(int which)
void updateMenuEntries(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' }; char temp[10] = { '\0' };
/* flag current value */ /* flag current value */