diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-09-26 16:28:02 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-09-26 17:28:10 +0000 |
commit | 221a2bcbd0bd9fc04eacbe223f9118cabecccac1 (patch) | |
tree | a1ac7c9901d4c2f3ed2e9293e48e5e0003a087f3 /epan | |
parent | cd6ca0da41ce2af151670486e724d47870705d44 (diff) |
Move some DIAG_OFFs to make code less ugly
Change-Id: I0f343ab69a6592a466e12e5d258f0878b9c32c25
Reviewed-on: https://code.wireshark.org/review/23752
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/proto.c | 6 | ||||
-rw-r--r-- | epan/tap.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/epan/proto.c b/epan/proto.c index c785733a1d..1a99ba2c23 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -433,6 +433,7 @@ static GSList *dissector_plugins = NULL; /* * Callback for each plugin found. */ +DIAG_OFF(pedantic) static gboolean check_for_dissector_plugin(GModule *handle) { @@ -445,9 +446,7 @@ check_for_dissector_plugin(GModule *handle) * Do we have a register routine? */ if (g_module_symbol(handle, "plugin_register", &gp)) { -DIAG_OFF(pedantic) register_protoinfo = (void (*)(void))gp; -DIAG_ON(pedantic) } else { register_protoinfo = NULL; @@ -457,9 +456,7 @@ DIAG_ON(pedantic) * Do we have a reg_handoff routine? */ if (g_module_symbol(handle, "plugin_reg_handoff", &gp)) { -DIAG_OFF(pedantic) reg_handoff = (void (*)(void))gp; -DIAG_ON(pedantic) } else { reg_handoff = NULL; @@ -480,6 +477,7 @@ DIAG_ON(pedantic) dissector_plugins = g_slist_prepend(dissector_plugins, plugin); return TRUE; } +DIAG_ON(pedantic) static void register_dissector_plugin(gpointer data, gpointer user_data _U_) diff --git a/epan/tap.c b/epan/tap.c index 44ab2fc2a7..4760a3b302 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -125,6 +125,7 @@ static GSList *tap_plugins = NULL; /* * Callback for each plugin found. */ +DIAG_OFF(pedantic) static gboolean check_for_tap_plugin(GModule *handle) { @@ -143,9 +144,7 @@ check_for_tap_plugin(GModule *handle) /* * Yes - this plugin includes one or more taps. */ -DIAG_OFF(pedantic) register_tap_listener_fn = (void (*)(void))gp; -DIAG_ON(pedantic) /* * Add this one to the list of tap plugins. @@ -155,6 +154,7 @@ DIAG_ON(pedantic) tap_plugins = g_slist_prepend(tap_plugins, plugin); return TRUE; } +DIAG_ON(pedantic) void register_tap_plugin_type(void) |