From b45b6b442f0e3f821921a48f957944f485adfd1b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 10 Sep 2021 20:11:27 -0400 Subject: Fix conversion warnings --- include/zix/sem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/zix') diff --git a/include/zix/sem.h b/include/zix/sem.h index 5b018fc..c773ef1 100644 --- a/include/zix/sem.h +++ b/include/zix/sem.h @@ -108,7 +108,8 @@ struct ZixSemImpl { static inline ZixStatus zix_sem_init(ZixSem* sem, unsigned val) { - return semaphore_create(mach_task_self(), &sem->sem, SYNC_POLICY_FIFO, val) + return semaphore_create( + mach_task_self(), &sem->sem, SYNC_POLICY_FIFO, (int)val) ? ZIX_STATUS_ERROR : ZIX_STATUS_SUCCESS; } @@ -150,7 +151,7 @@ struct ZixSemImpl { static inline ZixStatus zix_sem_init(ZixSem* sem, unsigned initial) { - sem->sem = CreateSemaphore(NULL, initial, LONG_MAX, NULL); + sem->sem = CreateSemaphore(NULL, (LONG)initial, LONG_MAX, NULL); return (sem->sem) ? ZIX_STATUS_SUCCESS : ZIX_STATUS_ERROR; } -- cgit v1.2.1