summaryrefslogtreecommitdiff
path: root/srd.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2018-08-30 20:46:43 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2018-08-30 22:21:03 +0200
commit577af027774c422a1d5a73b7a8d1da03caa4e068 (patch)
tree57764e9eff380a2a174a0024b62fdb504596a7f3 /srd.c
parent2842721f189c5338d268a6e70002936289ae6069 (diff)
downloadlibsigrokdecode-577af027774c422a1d5a73b7a8d1da03caa4e068.tar.gz
libsigrokdecode-577af027774c422a1d5a73b7a8d1da03caa4e068.zip
srd_exit(): Fix a -Wcast-function-type compiler warning.
srd.c: In function ‘srd_exit’: srd.c:310:28: warning: cast between incompatible function types from ‘int (*)(struct srd_session *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type] g_slist_foreach(sessions, (GFunc)srd_session_destroy, NULL); ^
Diffstat (limited to 'srd.c')
-rw-r--r--srd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/srd.c b/srd.c
index d4ec44b..5903c6d 100644
--- a/srd.c
+++ b/srd.c
@@ -307,7 +307,8 @@ SRD_API int srd_exit(void)
{
srd_dbg("Exiting libsigrokdecode.");
- g_slist_foreach(sessions, (GFunc)srd_session_destroy, NULL);
+ for (GSList *l = sessions; l; l = l->next)
+ srd_session_destroy(l->data);
srd_decoder_unload_all();
g_slist_free_full(searchpaths, g_free);