ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 11 Jan 2016 20:05:49 -0800
On Jan 11, 2016, at 2:33 AM, Alexis La Goutte <alexis.lagoutte@xxxxxxxxx> 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.