aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-11-08 00:01:19 +0000
committerJörg Mayer <jmayer@loplof.de>2013-11-08 00:01:19 +0000
commit7c2c2d89f575bd4d0b2dc0e8a148bce07de2ab39 (patch)
tree5248dda64470f3f463b742c3bf65f129dd9b24c9 /epan/proto.h
parent06fdf8130db9571f095d2e2dc891af592a7f0084 (diff)
Fix:
cd /home/jmayer/work/wireshark/svn/build/qt-gtk3/epan && /usr/bin/cc -DG_DISABLE_DEPRc In file included from /home/jmayer/work/wireshark/svn/trunk/epan/packet.h:29:0, from /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dp: /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dparityfec.c: In functio: /home/jmayer/work/wireshark/svn/trunk/epan/proto.h:2128:2: error: ISO C90 forbids mixe] extern header_field_info __start__data_ ##proto[]; \ ^ /home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-2dparityfec.c:331:4: note’ proto_register_fields(proto_2dparityfec, hfi, array_length(hfi)); ^ cc1: all warnings being treated as errors svn path=/trunk/; revision=53152
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 419393b969..c269de1a9e 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -2125,10 +2125,12 @@ proto_custom_set(proto_tree* tree, const int field_id,
#define HFI_INIT(proto) __attribute__((section( "_data_" G_STRINGIFY(proto)))) __attribute__((aligned(sizeof(void *))))
#define proto_register_fields(proto, hfi, count) \
+ do { \
extern header_field_info __start__data_ ##proto[]; \
extern header_field_info __stop__data_ ##proto[]; \
\
- proto_register_fields_section(proto, __start__data_ ##proto, (int) (__stop__data_ ##proto - __start__data_ ##proto))
+ proto_register_fields_section(proto, __start__data_ ##proto, (int) (__stop__data_ ##proto - __start__data_ ##proto)); \
+ } while(0)
#else
#define HFI_INIT(proto)
#define proto_register_fields(proto, hfi, count) \