Wireshark mailing list archives

Re: Compiling Wireshark with gcc-6: Lots of new warnings


From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Wed, 10 Feb 2016 13:00:36 +0100

Hi, i have now a build machine with gcc6 and try..
There is always some warning, i have push a first serie of patch
https://code.wireshark.org/review/#/q/topic:gcc6

For dissectors, the last one is :
../../asn1/q932/packet-q932-exp.h:26:27: error:
‘q932_PresentedNumberUnscreened_vals’ defined but not used
[-Werror=unused-const-variable]
../../asn1/q932/packet-q932-exp.h:18:27: error:
‘q932_PresentedNumberScreened_vals’ defined but not used
[-Werror=unused-const-variable]
../../asn1/q932/packet-q932-exp.h:10:27: error:
‘q932_PresentedAddressUnscreened_vals’ defined but not used
[-Werror=unused-const-variable]
../../asn1/q932/packet-q932-exp.h:2:27: error:
‘q932_PresentedAddressScreened_vals’ defined but not used
[-Werror=unused-const-variable]

If there is a expert of ASN1 dissector generator ;-)

Cheers



On Tue, Jan 12, 2016 at 5:05 AM, Guy Harris <guy () alum mit edu> wrote:


On Jan 11, 2016, at 2:33 AM, Alexis La Goutte <alexis.lagoutte () gmail com>
wrote:

About unused-const-variable, it is already enable when use clang and
clang don't found this warning...
after a check, it is only from const define on .h file.. and when look
.c file, the const is used...
false positive ? need to include .c file on .h ? i have don't yet search
if it is already known issue with gcc

I addressed the first warning of that sort with

        https://code.wireshark.org/review/13198

by moving the *definition* out of the header into a source file, leaving
only a *declaration* in the header.  That way, you don't get unused tables
in compilers that don't optimize it out and you don't get warnings from GCC.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: