From 2842721f189c5338d268a6e70002936289ae6069 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 30 Aug 2018 20:42:05 +0200 Subject: srd_decoder_unload_all(): Fix a -Wcast-function-type compiler warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit decoder.c: In function ‘srd_decoder_unload_all’: decoder.c:1080:27: warning: cast between incompatible function types from ‘int (*)(struct srd_decoder *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_slist_foreach(pd_list, (GFunc)srd_decoder_unload, NULL); ^ --- decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/decoder.c b/decoder.c index c195e4b..7374b77 100644 --- a/decoder.c +++ b/decoder.c @@ -1077,7 +1077,8 @@ SRD_API int srd_decoder_load_all(void) */ SRD_API int srd_decoder_unload_all(void) { - g_slist_foreach(pd_list, (GFunc)srd_decoder_unload, NULL); + for (GSList *l = pd_list; l; l = l->next) + srd_decoder_unload(l->data); g_slist_free(pd_list); pd_list = NULL; -- cgit v1.2.3-70-g09d2