In gcc 8, -Wall -Wextra includes -Wcast-function-type, which warns
about passing an extra (unwanted) parameter to callbacks. Instead
of using _dbus_list_foreach(), open-code the equivalent here.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107349
Reviewed-by: Thiago Macieira <thiago@kde.org>
return DBUS_DISPATCH_NEED_MEMORY;
}
-
- _dbus_list_foreach (&filter_list_copy,
- (DBusForeachFunction)_dbus_message_filter_ref,
- NULL);
+
+ for (link = _dbus_list_get_first_link (&filter_list_copy);
+ link != NULL;
+ link = _dbus_list_get_next_link (&filter_list_copy, link))
+ _dbus_message_filter_ref (link->data);
/* We're still protected from dispatch() reentrancy here
* since we acquired the dispatcher