From ad6d259e1e709cc1654c9c134553e95075c9ac2f Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 15 Feb 2015 10:25:17 -0800 Subject: EtherCAT: Suppress pedantic warnings. Try to suppress warning: type of bit-field 'foo' is a GCC extension [-Wpedantic] Change-Id: If161a509db2d6aaad3bb656318902f0bc7b0d0a9 Reviewed-on: https://code.wireshark.org/review/7136 Reviewed-by: Gerald Combs --- plugins/ethercat/packet-ecatmb.h | 7 +++++-- plugins/ethercat/packet-ethercat-frame.h | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/ethercat/packet-ecatmb.h b/plugins/ethercat/packet-ecatmb.h index 8b9accc631..6143c01dce 100644 --- a/plugins/ethercat/packet-ecatmb.h +++ b/plugins/ethercat/packet-ecatmb.h @@ -23,6 +23,9 @@ #ifndef _PACKET_ECATMAILBOX_H_ #define _PACKET_ECATMAILBOX_H_ +#include +DIAG_OFF(pedantic) + /* Ensure the same data layout for all platforms */ typedef struct TETHERNET_ADDRESS @@ -109,7 +112,6 @@ typedef union tEoeMacFilterOptionsUnion guint16 Options; } EoeMacFilterOptionsUnion; - typedef struct TETHERCAT_EOE_MACFILTER { EoeMacFilterOptionsUnion anEoeMacFilterOptionsUnion; @@ -477,4 +479,5 @@ typedef struct TETHERCAT_SOE_HEADER extern void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, gint offset); -#endif +DIAG_ON(pedantic) +#endif /* _PACKET_ECATMAILBOX_H_ */ diff --git a/plugins/ethercat/packet-ethercat-frame.h b/plugins/ethercat/packet-ethercat-frame.h index 2bcdbe0a6a..885592022e 100644 --- a/plugins/ethercat/packet-ethercat-frame.h +++ b/plugins/ethercat/packet-ethercat-frame.h @@ -23,7 +23,10 @@ #ifndef _PACKET_ETHERCAT_FRAME_H #define _PACKET_ETHERCAT_FRAME_H +#include + /* structure for decoding the header -----------------------------------------*/ +DIAG_OFF(pedantic) typedef union _EtherCATFrameParser { struct @@ -34,8 +37,9 @@ typedef union _EtherCATFrameParser } v; guint16 hdr; } EtherCATFrameParserHDR; +DIAG_ON(pedantic) typedef EtherCATFrameParserHDR *PEtherCATFrameParserHDR; #define EtherCATFrameParserHDR_Len (int)sizeof(EtherCATFrameParserHDR) -#endif +#endif /* _PACKET_ETHERCAT_FRAME_H */ -- cgit v1.2.3