Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Errors in decoder function.

From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Wed, 04 Oct 2006 10:35:32 +0800


prashanth joshi wrote:
Hi, the following are the statements to manipulate the tvb data in my code: 1) void proto_register_gtp(void)
{
           static  hf_register_info hf_gtp[] = {
{ &hf_record_type, {" Record Type", "RecordType.val",FT_UINT32, BASE_DEC, NULL,0,"", HFILL }},
...........................................     .....................

[...]

But I'm getting the following errors:
Please any one tell me what i need to do to avoid this error.
Regards,
Prashanth

ERRORS :
 (near initialization for `hf_gtp[60]')
 initializer element is not constant
 (near initialization for `hf_gtp[61].hfinfo')
 warning: missing initializer
 warning: (near initialization for `hf_gtp[61].hfinfo')
 initializer element is not constant
 (near initialization for `hf_gtp[61]')
 initializer element is not constant
 (near initialization for `hf_gtp[62].hfinfo')
 warning: missing initializer
.......... ...................................
And it continues for values like 63, 64 etc.............

You showed us hf_gtp[0] but not hf_gtp[60] (where the problem is/starts). I'd suggest looking (or sending to the list) hf_gtp[59] through [64], the problem seems to be there.