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

Wireshark-dev: Re: [Wireshark-dev] Making gcc less pedantic

From: Evan Huus <eapache@xxxxxxxxx>
Date: Fri, 13 Feb 2015 15:57:26 -0500
The last time something like this came up (admittedly a while ago)
somebody dug up a compiler we still wanted to support that only knew
about C90 - we left the current state of things so we'd catch
incompatibilities with that toolchain.

I'm kind of hoping that's no longer a concern :)

On Fri, Feb 13, 2015 at 3:54 PM, Gerald Combs <gerald@xxxxxxxxxxxxx> wrote:
> 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.
>
> ___________________________________________________________________________
> 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