Pelles C forum

Pelles C => Bug reports => Topic started by: Mikehg on October 16, 2005, 08:08:25 AM

Title: Strange warning #2135
Post by: Mikehg on October 16, 2005, 08:08:25 AM
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.
Title: Strange warning #2135
Post by: Pelle on October 16, 2005, 07:25:32 PM
OK - I will look at it.

Pelle