mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 09:18:12 +02:00
test: Fix signature of dbus_internal_do_not_use_try_message_file
In gcc 8, -Wall -Wextra includes -Wcast-function-type, which warns about casting a function pointer to an incompatible type. In this case the cast was because we were ignoring the void * argument, which in this case is NULL. Since this function is only used within dbus-message-util.c anyway, we might as well just use the correct signature and remove the cast. 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>
This commit is contained in:
parent
b387bd4d29
commit
09300a5e6f
2 changed files with 6 additions and 7 deletions
|
|
@ -449,11 +449,13 @@ dbus_internal_do_not_use_load_message_file (const DBusString *filename,
|
|||
*
|
||||
* @param filename filename to load
|
||||
* @param expected_validity what the message has to be like to return #TRUE
|
||||
* @param unused ignored
|
||||
* @returns #TRUE if the message has the expected validity
|
||||
*/
|
||||
dbus_bool_t
|
||||
static dbus_bool_t
|
||||
dbus_internal_do_not_use_try_message_file (const DBusString *filename,
|
||||
DBusValidity expected_validity)
|
||||
DBusValidity expected_validity,
|
||||
void *unused)
|
||||
{
|
||||
DBusString data;
|
||||
dbus_bool_t retval;
|
||||
|
|
@ -1801,9 +1803,8 @@ _dbus_message_test (const char *test_data_dir)
|
|||
initial_fds = _dbus_check_fdleaks_enter ();
|
||||
|
||||
if (!dbus_internal_do_not_use_foreach_message_file (test_data_dir,
|
||||
(DBusForeachMessageFileFunc)
|
||||
dbus_internal_do_not_use_try_message_file,
|
||||
NULL))
|
||||
dbus_internal_do_not_use_try_message_file,
|
||||
NULL))
|
||||
_dbus_test_fatal ("foreach_message_file test failed");
|
||||
|
||||
_dbus_check_fdleaks_leave (initial_fds);
|
||||
|
|
|
|||
|
|
@ -99,8 +99,6 @@ dbus_bool_t _dbus_credentials_test (const char *test_data_dir);
|
|||
void _dbus_run_tests (const char *test_data_dir,
|
||||
const char *specific_test);
|
||||
|
||||
dbus_bool_t dbus_internal_do_not_use_try_message_file (const DBusString *filename,
|
||||
DBusValidity expected_validity);
|
||||
dbus_bool_t dbus_internal_do_not_use_try_message_data (const DBusString *data,
|
||||
DBusValidity expected_validity);
|
||||
dbus_bool_t dbus_internal_do_not_use_load_message_file (const DBusString *filename,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue