From 6221c8d255cf7a8a6302a59d7ac52169968f73ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Thu, 26 Nov 2015 02:51:46 +0000 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- wiretap/wtap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'wiretap') 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 #include +#include #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; } -- cgit v1.2.3