From 6f5414f58b447194349cdd2093141d6c694eceec Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 15 Mar 2024 12:53:54 +0100 Subject: [PATCH] fix warning --- src/sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sched.c b/src/sched.c index a465f48..9b9c388 100644 --- a/src/sched.c +++ b/src/sched.c @@ -13,7 +13,8 @@ int sched_spawn(taskfunc f, void *closure, struct scheduler *s) { int errno; // Création d'un thread pour la tâche - if ((errno = pthread_create(&thread, NULL, (void *)f, closure)) != 0) { + if ((errno = pthread_create(&thread, NULL, (void *(*)(void *))f, closure)) != + 0) { fprintf(stderr, "pthread_create error %d\n", errno); return -1; }