diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2018-08-30 20:46:43 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-08-30 22:21:03 +0200 |
commit | 577af027774c422a1d5a73b7a8d1da03caa4e068 (patch) | |
tree | 57764e9eff380a2a174a0024b62fdb504596a7f3 | |
parent | 2842721f189c5338d268a6e70002936289ae6069 (diff) | |
download | libsigrokdecode-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);
^
-rw-r--r-- | srd.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |