summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 20:11:27 -0400
committerDavid Robillard <d@drobilla.net>2021-09-10 20:11:27 -0400
commitb45b6b442f0e3f821921a48f957944f485adfd1b (patch)
tree8c90c3b6842b66f4708ab415e500e1eed41fe0b0 /include
parent87ae32d754d211d1f6510af098c2349a28f17351 (diff)
downloadzix-b45b6b442f0e3f821921a48f957944f485adfd1b.tar.gz
zix-b45b6b442f0e3f821921a48f957944f485adfd1b.tar.bz2
zix-b45b6b442f0e3f821921a48f957944f485adfd1b.zip
Fix conversion warnings
Diffstat (limited to 'include')
-rw-r--r--include/zix/sem.h5
1 files changed, 3 insertions, 2 deletions
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;
}