From 32a014a4f163f258a335ef86a61dca594f2891ac Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 16 May 2019 18:16:48 -0700 Subject: Update the warning-suppression statements in idl2wrs. Update them to use ws_diag_control.h and ws_compiler_tests.h, and the DIAG_OFF() macros therein. Regenerate the CORBA dissectors. Change-Id: I26f0add0ec8dd920bfe80571b4141c1b0e2f0640 Reviewed-on: https://code.wireshark.org/review/33238 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- tools/wireshark_gen.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py index 2d7d412743..cc392e9ba5 100755 --- a/tools/wireshark_gen.py +++ b/tools/wireshark_gen.py @@ -2584,14 +2584,19 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { #include #include +#include "ws_diag_control.h" +#include "ws_compiler_tests.h" + #ifdef _MSC_VER /* disable warning: "unreference local variable" */ #pragma warning(disable:4101) #endif -#if defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wunused-function" -#pragma GCC diagnostic ignored "-Wunused-variable" +/* XXX this should be autogenerated, or the warnings fixed in the generator */ +DIAG_OFF(unused-function) +DIAG_OFF(unused-variable) +#if WS_IS_AT_LEAST_GNUC_VERSION(6,0) +DIAG_OFF(unused-const-variable) #endif""" -- cgit v1.2.3