diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2018-08-30 20:42:05 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-08-30 22:21:03 +0200 |
commit | 2842721f189c5338d268a6e70002936289ae6069 (patch) | |
tree | a2ef89de670b5d6fc35932f7815e6f49e84fa050 | |
parent | c7b211b18466c69df976a6d71f1c8ba30145f14c (diff) | |
download | libsigrokdecode-2842721f189c5338d268a6e70002936289ae6069.tar.gz libsigrokdecode-2842721f189c5338d268a6e70002936289ae6069.zip |
srd_decoder_unload_all(): Fix a -Wcast-function-type compiler warning.
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);
^
-rw-r--r-- | decoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |