Reported by Ross Burton
gweb/giognutls.c: In function ‘g_io_gnutls_dispatch’:
gweb/giognutls.c:307:17: error: cast between incompatible function types from
‘GSourceFunc’ {aka ‘int (*)$
tools/session-utils.c: In function ‘util_test_add’:
tools/session-utils.c:234:4: error: cast between incompatible function types from ‘void
(*)(const void *)$
(GTestFixtureFunc) run_test_cb,
tools/session-utils.c:235:4: error: cast between incompatible function types from ‘void
(*)(void *)’ to ‘$
(GTestFixtureFunc) g_free);
---
gweb/giognutls.c | 2 +-
tools/session-utils.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/gweb/giognutls.c b/gweb/giognutls.c
index c029a8b0..b5c476cb 100644
--- a/gweb/giognutls.c
+++ b/gweb/giognutls.c
@@ -304,7 +304,7 @@ static gboolean g_io_gnutls_dispatch(GSource *source, GSourceFunc
callback,
gpointer user_data)
{
GIOGnuTLSWatch *watch = (GIOGnuTLSWatch *) source;
- GIOFunc func = (GIOFunc) callback;
+ GIOFunc func = (GIOFunc) (void (*) (void)) callback;
GIOCondition condition = watch->pollfd.revents;
DBG("source %p condition %u", source, condition);
diff --git a/tools/session-utils.c b/tools/session-utils.c
index 51cec5c3..77485f7c 100644
--- a/tools/session-utils.c
+++ b/tools/session-utils.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic ignored "-Wcast-function-type"
#include <gdbus.h>
--
2.19.0