aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-05-16 20:16:53 +0100
committerJoão Valverde <j@v6e.pt>2017-10-29 21:09:37 +0000
commitbebd79aae9ccaf5c96666d38665b69484f1f3eda (patch)
tree66cf1e21bcdd697f97e32a7f13b5b2c80dcd0032
parent63966ec5d5b65cde2297f1f7417d288f884a80b2 (diff)
parlay: Add another pragma to disable warning
Use our DIAG_OFF macros instead while at it. Change-Id: I01d8d71a42fb108be156a68f8552ce537a1e2484 Reviewed-on: https://code.wireshark.org/review/15467 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--epan/dissectors/packet-parlay.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-parlay.c b/epan/dissectors/packet-parlay.c
index 1abcb37fc3..e2d7bd9537 100644
--- a/epan/dissectors/packet-parlay.c
+++ b/epan/dissectors/packet-parlay.c
@@ -41,14 +41,19 @@
#include <epan/dissectors/packet-giop.h>
#include <epan/expert.h>
+#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
void proto_register_giop_parlay(void);