From 1e995512335639cdd2829ebc4c0562fe5d86958f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Wed, 23 Feb 2022 18:03:46 +0100 Subject: [PATCH] test: loop: do not use NULL as event handler --- test/test-loop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test-loop.c b/test/test-loop.c index 81f7a117c..0690736a7 100644 --- a/test/test-loop.c +++ b/test/test-loop.c @@ -227,6 +227,12 @@ PWTEST(pwtest_loop_recurse2) return PWTEST_PASS; } +static void +on_event_fail_if_called(void *data, int fd, uint32_t mask) +{ + pwtest_fail_if_reached(); +} + PWTEST(thread_loop_destroy_between_poll_and_lock) { pw_init(NULL, NULL); @@ -240,7 +246,7 @@ PWTEST(thread_loop_destroy_between_poll_and_lock) int evfd = eventfd(0, 0); pwtest_errno_ok(evfd); - struct spa_source *source = pw_loop_add_io(loop, evfd, SPA_IO_IN, true, NULL, NULL); + struct spa_source *source = pw_loop_add_io(loop, evfd, SPA_IO_IN, true, on_event_fail_if_called, NULL); pwtest_ptr_notnull(source); pw_thread_loop_start(thread_loop);