Emma Wermstrom wrote: > > In the module, Module.h file, I have declared the following: > > typedef /*@abstract@*/ struct _Module_Cmd_T { > > Module_Type_T Type; /* enum */ > Module_Info_T Info; /* struct */ > union { > > /*@NULL@*/ void * const NoData; > > bits32 Constant; > > /*@NULL@*/ const Module_Field_T Field; > } AdditionalInfo; > } Module_Cmd_T; > > where Module_Field_T, Module_Info_T and Module_Type_T have previously been > declared in Module.h > > bits32 is an unsigned long > > In another module, Module2, I try to give a value to an instance of the > Module_Cmd_T, like this: > > #include "Module.h" > /*@access Module_Cmd_T@*/ > > static const Module_Cmd_T pm Command_C[1] = > { > Module_Type_foo,
Doesn't the info field belong here ?? > {0, 16, NULL}, > (bits32)4 > }; > > Splint complains: > > Module2.c:12:10: Initial value of Command_C[0].AdditionalInfo is type > bits32, expects union { void * NoData; bits32 Constant; > Module_Field_T Field; }: (bits32)4 > Types are incompatible. (Use -type to inhibit warning) -- Chuck F ([EMAIL PROTECTED]) ([EMAIL PROTECTED]) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!