NO

Author Topic: Strange warning #2135  (Read 3513 times)

Mikehg

  • Guest
Strange warning #2135
« 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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Strange warning #2135
« Reply #1 on: October 16, 2005, 07:25:32 PM »
OK - I will look at it.

Pelle
/Pelle