fix warning

This commit is contained in:
Mylloon 2024-03-15 12:53:54 +01:00
parent 4eadb9fc98
commit 6f5414f58b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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;
}