November 14th, 2013, 03:30 AM
Line 7: warning: type does not match prototype: set
This is legacy code so please excuse the fact that it is a old as heck.
Not sure what's happening here, appearantly the compiler is spitting its dummy out over a bad prototype declaration, however I cannot see the problem.
Here is the complete code for this function:
Any help would be appreciated.
void decode( c_fileflags, array, set) /* decode various flags */
int x, i_fcode = 0, i_factor = 16384;
unsigned char tmp[ 2];
if( *c_fileflags == '\0')
strncpy( c_fileflags, " ", 2);
tmp[ 0] = ( unsigned char)( *c_fileflags);
tmp[ 1] = ( unsigned char)( *( c_fileflags+1));
i_fcode = ( tmp[ 0] - 32) * 200;
i_fcode += tmp[ 1] - 32;
if( i_fcode < 0 || i_fcode > 32767)
i_fcode = 0;
for( x = 1; x < 16; x++, array++)
*( array + ( set * 15)) = ( int)( i_fcode / i_factor);
i_fcode -= *( array + ( set * 15)) * i_factor;
i_factor /= 2;
November 14th, 2013, 05:27 AM
Which compiler do you use?
Is that the only error you receive?
November 14th, 2013, 07:41 AM
So where is the prototype that matches that function implementation?
November 14th, 2013, 09:14 AM
Sorry the prototype is as follows:
GLOBAL void decode( char *, int *, short);