Skip to content

Commit d707cc2

Browse files
committed
acl_threadsupport: fix integer conversion warning
Use same type for timed_out as member of struct acl_condvar_s. The return type is signed to accommodate for the error return value. Signed-off-by: Peter Colberg <[email protected]>
1 parent c80afea commit d707cc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/acl_threadsupport/src/acl_threadsupport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ void acl_release_condvar(struct acl_condvar_s *C) {
386386
// value otherwise.
387387
int acl_timed_wait_condvar(struct acl_condvar_s *C, unsigned timeout_period) {
388388
int my_entry_q;
389-
int timed_out = 0;
389+
unsigned int timed_out = 0;
390390
if (!C)
391391
return -1;
392392

@@ -449,7 +449,7 @@ int acl_timed_wait_condvar(struct acl_condvar_s *C, unsigned timeout_period) {
449449
}
450450

451451
// Still have the waiter mutex!
452-
return timed_out;
452+
return (int)timed_out;
453453
}
454454

455455
// Wait on the condition variable, then release the mutex.

0 commit comments

Comments
 (0)