News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Strange warning #2135

Started by Mikehg, October 16, 2005, 08:08:25 AM

Previous topic - Next topic

Mikehg

I get this warning:

bc.c(1137): warning #2135: Static 'VarTypeLookup' is not referenced.

VarTypeLookup is declared in global scope as:

static char* VarTypeLookup[]=
{
 "int","int","char*","double","float","FILE*","long double"
};

VarTypeLookup is referenced several times as:
strcpy(FuncType,VarTypeLookup[fooGetIdx()]);

It seems to only issue it if a function is used as the index to VarTypeLookup.

If I write it as: strcpy(FuncType,VarTypeLookup[2]);

then the warning goes away?

This is under warning level 1 btw.

Thanks,
Mike H.

Pelle

OK - I will look at it.

Pelle
/Pelle