B
bingfeng
I have some codes generated by perl, in which initialize some huge
struct,such as
PARA TOS_network_spantree_set_0_para_0 = { "vlan", emNUM, NULL, "",
"configuration on a designated vlan", PRO_REQUIRED };
const char* TOS_network_spantree_set_0_para_1_emvalue[] = { "disable",
"enable", NULL };
PARA TOS_network_spantree_set_0_para_1 = { "", emENUM,
TOS_network_spantree_set_0_para_1_emvalue, "", "enable or disable STP",
PRO_REQUIRED };
PPARA TOS_network_spantree_set_0_para[] = {
&TOS_network_spantree_set_0_para_0,
&TOS_network_spantree_set_0_para_1,
NULL
}
......
gcc(C89 setting) report warnings about that, but C99 not. I ignore those
warnings and try to dump the struct, the program crashed after some output.
what wrong and how I can fix it?
thanks a lot
struct,such as
PARA TOS_network_spantree_set_0_para_0 = { "vlan", emNUM, NULL, "",
"configuration on a designated vlan", PRO_REQUIRED };
const char* TOS_network_spantree_set_0_para_1_emvalue[] = { "disable",
"enable", NULL };
PARA TOS_network_spantree_set_0_para_1 = { "", emENUM,
TOS_network_spantree_set_0_para_1_emvalue, "", "enable or disable STP",
PRO_REQUIRED };
PPARA TOS_network_spantree_set_0_para[] = {
&TOS_network_spantree_set_0_para_0,
&TOS_network_spantree_set_0_para_1,
NULL
}
......
gcc(C89 setting) report warnings about that, but C99 not. I ignore those
warnings and try to dump the struct, the program crashed after some output.
what wrong and how I can fix it?
thanks a lot