Wireshark-dev: Re: [Wireshark-dev] Is it just me? (build error in packet-q708.c)

From: Gerasimos Dimitriadis <gedimitr@xxxxxxxxx>
Date: Wed, 19 May 2010 23:21:46 +0300
Hi,

I think that in this case there is no need for a conversion macro, since we are not dealing with arrays but with pointers to value_string_ext. By the way, are the VALS/TFS/RVALS casts necessary for certain compilers? Because I thought that arrays automatically decay to pointers when needed (and as far as I can tell this is the case with gcc)

Regards,
Gerasimos

Jaap Keuter wrote:
On 05/19/2010 04:07 PM, Jakub Zawadzki wrote:
On Wed, May 19, 2010 at 02:56:52PM +0100, Martin Mathieson wrote:
         {&hf_q708_sanc,
                 { "Signalling Area Network Code (SANC)","q708.sanc",
-               FT_UINT16, BASE_DEC | BASE_EXT_STRING,
VALS(&q708_sanc_areas_ext), 0x0,
+               FT_UINT16, BASE_DEC | BASE_EXT_STRING,
VALS(&q708_sanc_areas_ext.vals), 0x0,
                 NULL, HFILL }
         },
This patch is wrong, proper way IMHO is to remove VALS() cast, i.e.

-  FT_UINT16, BASE_DEC | BASE_EXT_STRING, VALS(&q708_sanc_areas_ext), 0x0,
+  FT_UINT16, BASE_DEC | BASE_EXT_STRING, &q708_sanc_areas_ext, 0x0,
Regards.

Hi,

I think you're right.

Could someone with knowledge of this feature please provide:
1. The proper conversion macro.
2. Update the comment in epan/proto.h
3. Augment the description in doc/README.developer.

Thanks,
Jaap
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe