Re: [Emc-developers] help with fix for compile warning

2008-02-09 Thread Chris Morley
Thanks guys. Of course your solution is so obvious! cheers Chris Morley > Date: Sat, 9 Feb 2008 11:59:03 + > From: [EMAIL PROTECTED] > To: emc-developers@lists.sourceforge.net > Subject: Re: [Emc-developers] help with fix for compile war

Re: [Emc-developers] help with fix for compile warning

2008-02-09 Thread John Kasunich
Chris Morley wrote: > Hi guys: > > I am trying to fix compiler warnings on classicladder v7.124. > In the file.c source there is a warning: ISO C90 forbids mixed declarations > and code. Of course if I just change the order of the code to stop the error > it changes the info that the function

Re: [Emc-developers] help with fix for compile warning

2008-02-09 Thread ben lipkowitz
On Sat, 9 Feb 2008, Chris Morley wrote: > In the file.c source there is a warning: ISO C90 forbids mixed > declarations and code. it's typical bondage & discipline crap. the idea is to have all the variables initialized at the top. try this: char *cl_fgets(char *s, int size, FILE *stream)

Re: [Emc-developers] help with fix for compile warning

2008-02-09 Thread Mario .
I'm not sure, but doesn'tit require some prior initialization? Compilers find it easier to use a code when they find some declarations just preceding the actual code. in some cases (in asm) I use two types of routines, ones with autoincrement and ones without, so that one can precede data entry wi

[Emc-developers] help with fix for compile warning

2008-02-09 Thread Chris Morley
Hi guys: I am trying to fix compiler warnings on classicladder v7.124. In the file.c source there is a warning: ISO C90 forbids mixed declarations and code. Of course if I just change the order of the code to stop the error it changes the info that the function fgets is passed. Please see the