treewide: print pthread_t as a pointer

On glibc, `pthread_t` is `unsigned long int` while on musl
it has a pointer type. To avoid format string warnings,
cast it to `void *` and use the `%p` format specifier.
This commit is contained in:
Barnabás Pőcze 2023-02-25 20:45:28 +01:00
parent d776d378cd
commit 0e0a2627aa
2 changed files with 7 additions and 7 deletions

View file

@ -336,7 +336,7 @@ static void loop_enter(void *object)
spa_return_if_fail(impl->thread == thread_id);
impl->enter_count++;
}
spa_log_trace(impl->log, "%p: enter %lu", impl, impl->thread);
spa_log_trace(impl->log, "%p: enter %p", impl, (void *) impl->thread);
}
static void loop_leave(void *object)
@ -347,7 +347,7 @@ static void loop_leave(void *object)
spa_return_if_fail(impl->enter_count > 0);
spa_return_if_fail(impl->thread == thread_id);
spa_log_trace(impl->log, "%p: leave %lu", impl, impl->thread);
spa_log_trace(impl->log, "%p: leave %p", impl, (void *) impl->thread);
if (--impl->enter_count == 0) {
impl->thread = 0;