summaryrefslogtreecommitdiff
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-11-26 02:51:46 +0000
committerAnders Broman <a.broman58@gmail.com>2015-11-27 13:13:07 +0000
commit6221c8d255cf7a8a6302a59d7ac52169968f73ab (patch)
tree864a2e052ee3e8507fc583e1f6c59945b22123ac /wiretap/wtap.c
parent24d546353be7cf64787c4e6690f0bb5cedf43f5f (diff)
downloadwireshark-6221c8d255cf7a8a6302a59d7ac52169968f73ab.tar.gz
wtap: Disable ISO C forbids conversion [-Wpedantic]
wtap.c:74:25: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic] Choose ISO C or dynamic loading, can't have both. Change-Id: I6d48073dadaf7c1710bd87ed71a2e7b65970d47e Reviewed-on: https://code.wireshark.org/review/12165 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 3b5a322f5c..30b66cd46f 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -36,6 +36,7 @@
#include "file_wrappers.h"
#include <wsutil/file_util.h>
#include <wsutil/buffer.h>
+#include <wsutil/ws_diag_control.h>
#ifdef HAVE_PLUGINS
@@ -57,7 +58,6 @@ static gboolean
check_for_wtap_plugin(GModule *handle)
{
gpointer gp;
- void (*register_wtap_module)(void);
wtap_plugin *plugin;
/*
@@ -70,14 +70,12 @@ check_for_wtap_plugin(GModule *handle)
/*
* Yes - this plugin includes one or more wiretap modules.
- */
- register_wtap_module = (void (*)(void))gp;
-
- /*
* Add this one to the list of wiretap module plugins.
*/
plugin = (wtap_plugin *)g_malloc(sizeof (wtap_plugin));
- plugin->register_wtap_module = register_wtap_module;
+DIAG_OFF(pedantic)
+ plugin->register_wtap_module = (void (*)(void))gp;
+DIAG_ON(pedantic)
wtap_plugins = g_slist_append(wtap_plugins, plugin);
return TRUE;
}