From 07fc4a8506b37723a291bdbab03ade50dc03dcbf Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 14 Jun 2018 15:14:11 +0200 Subject: [PATCH] gatchat: Use pragma to mask GFunc casting warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gatchat/gatmux.c: In function ‘watch_dispatch’: gatchat/gatmux.c:454:17: error: cast between incompatible function types from ‘GSourceFunc’ {aka ‘int (*)(void *)’} to ‘gboolean (*)(GIOChannel *, GIOCondition, void *)’ {aka ‘int (*)(struct _GIOChannel *, enum , void *)’} [-Werror=cast-function-type] GIOFunc func = (GIOFunc) callback; ^ --- gatchat/gatmux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c index d492edb5..5867b37e 100644 --- a/gatchat/gatmux.c +++ b/gatchat/gatmux.c @@ -30,6 +30,8 @@ #include #include +#pragma GCC diagnostic ignored "-Wcast-function-type" + #include #include "ringbuffer.h"