22 Sep, 2008, The_Fury wrote in the 1st comment:
Votes: 0
I get this error when adding IMC2 Freedom2.2 Client Snippet.

imc.c:7492: error: 'for' loop initial declaration used outside C99 mode
#if defined(SMAUGSOCIAL)
// lower-case the social name before asking the MUD
static char lcSocName[LGST];
for (int i = 0; i < LGST && sname[i] != '\0'; i++)
{
lcSocName[i] = tolower(sname[i]);
}


Got any ideas?
22 Sep, 2008, Zeno wrote in the 2nd comment:
Votes: 0
Try declaring int i outside the for loop?
22 Sep, 2008, The_Fury wrote in the 3rd comment:
Votes: 0
And while i am at it, i get a number of warnings like these:

imc.c: In function 'imcsetup':
imc.c:5454: warning: assignment discards qualifiers from pointer target type
imc.c:5455: warning: assignment discards qualifiers from pointer target type
imc.c:5456: warning: assignment discards qualifiers from pointer target type
imc.c: In function 'imctell':

argument = imcone_argument( argument, imccmd );
argument = imcone_argument( argument, chan );
argument = imcone_argument( argument, arg1 );


I am guessing this has to do with the Const fixes that my code is lacking.
22 Sep, 2008, Zeno wrote in the 4th comment:
Votes: 0
Those at least would compile.
22 Sep, 2008, Guest wrote in the 5th comment:
Votes: 0
The first one with the loop you just need to define "i" up with the other declarations. This slipped by because SmaugFUSS uses C++ where that syntax is legal.

And the second one with discarded qualifiers is because of the const fixes. You can change the definition of IMC_CMD in the imc.h file and see if that gets you around it for now.
22 Sep, 2008, The_Fury wrote in the 6th comment:
Votes: 0
Thanks Zeno, that was exactly what was required, it now compiles, but it would be nice to get rid of those warnings. Now to see if it actually works.
22 Sep, 2008, The_Fury wrote in the 7th comment:
Votes: 0
Got rid of all but 3 warnings, that i can live with for now, thanks for the help.
0.0/7