X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fsession.c;h=d1a19c56e9967a7187d3dc8fdfca01da25848ab1;hp=5e48f4a5aeee5b1aafaf5ea1e2d595d407f6a2c0;hb=6cfc6c5c7a2fbb8be10b282b0b2bfe9ce9653984;hpb=4c5ac0cf5b3e8a13d6f0ff4255fa21ed6874774a diff --git a/src/session.c b/src/session.c index 5e48f4a5..d1a19c56 100644 --- a/src/session.c +++ b/src/session.c @@ -126,7 +126,7 @@ static gboolean fd_source_dispatch(GSource *source, sr_err("Callback not set, cannot dispatch event."); return G_SOURCE_REMOVE; } - keep = (*(sr_receive_data_callback)callback) + keep = (*SR_RECEIVE_DATA_CALLBACK(callback)) (fsource->pollfd.fd, revents, user_data); if (fsource->timeout_us >= 0 && G_LIKELY(keep) @@ -1237,7 +1237,7 @@ SR_PRIV int sr_session_fd_source_add(struct sr_session *session, if (!source) return SR_ERR; - g_source_set_callback(source, (GSourceFunc)cb, cb_data, NULL); + g_source_set_callback(source, G_SOURCE_FUNC(cb), cb_data, NULL); ret = sr_session_source_add_internal(session, key, source); g_source_unref(source);