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

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

From: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Wed, 19 May 2010 14:56:52 +0100
I don't understand why I need to patch below to build this dissector, whereas the buildbots seem to be fine.

Index: epan/dissectors/packet-q708.c
===================================================================
--- epan/dissectors/packet-q708.c       (revision 32881)
+++ epan/dissectors/packet-q708.c       (working copy)
@@ -11686,7 +11686,7 @@
        static hf_register_info hf[] = {
        { &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 }
        },
        { &hf_q708_ispc_name,



Without this patch I get:

packet-q708.c: In function `proto_register_q708':
packet-q708.c:11689: warning: dereferencing type-punned pointer will break strict-aliasing rules

This could be made to work if value_string_ext were re-ordered so that 'vals' was at the start...

typedef struct _value_string_ext {
  value_string_match_t match;
  guint length;                 /* length of the array */
  const value_string *vals;     /* the value string */
} value_string_ext;

Martin