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] Latest SVN (r38309) doesn't compile (packet-6lowpan.c)

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Tue, 02 Aug 2011 12:24:23 -0400
On 8/2/2011 11:19 AM, Marc Petit-Huguenin wrote:

I had the same exact problem when my Debian sid distribution updated the gcc 4.6
compiler.  I use 4.5 instead, and everything works.



Um... I suspect you had a slightly different problem when compiling with GCC 4.6 which added a check for "unused but set" variables.

These warnings are slowly being fixed. In the meantime:

If you don't want to see the warnings, add the following to configure.in at the appropriate place:

AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-unused-but-set-variable)



If you are using -Werror then adding the following will allow use of GCC 4.6 to build Wireshark without the compile erroring out:

AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-error=unused-but-set-variable)

In this case, unused-but-set is reported but treated as a warning even if "treat all warnings as errors" (-Werror) is enabled.


(Q: When you say "everything works" with 4.5, does that mean that compiling Wireshark with GCC 4.6 errored out ?

Does the Debian sid distribution provide Wireshark source configured to use -Werror ??).