I have the following static array in header file:
static MyStruct_t MyStructArray[] = {
......
......
......
}
But gcc issues a warning:
warning: `MyStructArray' defined but not used
What is the correct way to handle the situation?
UPD:
Defining the array as const:
const MyStruct_t MyStructArray[] = {
......
fixes thwe situation. So what is the preferred way extern or const in header?