R
Roman Mashak
Hello,
say I've a code:
....
struct device_defs {
unsigned int vendor;
unsigned int dev;
unsigned int mask;
unsigned long data;
};
static struct device_defs device_defs_tbl[] =
{
{ 0x0000, 0x0011, 0x0000, 0x0000, 0, 0, 0},
{ }
}
int main(void)
{
...
return 0;
}
What's correct way to initialize 'device_defs_tbl'? Running
'gcc -std=c99 -W -Wall' or '-ansi' both result in warnings:
t.c:13: warning: missing initializer
t.c:13: warning: (near initialization for `device_defs_tbl[1].vendor')
Thank you.
With best regards, Roman Mashak. E-mail: (e-mail address removed)
say I've a code:
....
struct device_defs {
unsigned int vendor;
unsigned int dev;
unsigned int mask;
unsigned long data;
};
static struct device_defs device_defs_tbl[] =
{
{ 0x0000, 0x0011, 0x0000, 0x0000, 0, 0, 0},
{ }
}
int main(void)
{
...
return 0;
}
What's correct way to initialize 'device_defs_tbl'? Running
'gcc -std=c99 -W -Wall' or '-ansi' both result in warnings:
t.c:13: warning: missing initializer
t.c:13: warning: (near initialization for `device_defs_tbl[1].vendor')
Thank you.
With best regards, Roman Mashak. E-mail: (e-mail address removed)