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] Making gcc less pedantic

From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Fri, 13 Feb 2015 12:54:32 -0800
Would it make sense to make gcc's "-pedantic" warnings a bit less
pedantic, e.g. with "-std=c99"? One of my recent commits changed the
type of a bit field from unsigned int to an enum, which results in the
following warning:

../epan/frame_data.h:75:5: warning: type of bit-field 'encoding' is a
GCC extension [-Wpedantic]
     packet_char_enc encoding    : 1; /**< Character encoding (ASCII,
EBCDIC...) */
     ^

In this particular case having a "packet_char_enc" encoding instead of
an "unsigned int" encoding is useful, otherwise you have to cast back to
packet_char_enc further down the line. It also compiles under Clang,
Visual C++, and Solaris Studio without warning.