Skip to content

Commit

Permalink
acl_threadsupport: fix integer conversion warning
Browse files Browse the repository at this point in the history
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 <peter.colberg@intel.com>
  • Loading branch information
pcolberg committed Nov 16, 2022
1 parent 44f72a0 commit e21bb5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/acl_threadsupport/src/acl_threadsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void acl_release_condvar(struct acl_condvar_s *C) {
// value otherwise.
int acl_timed_wait_condvar(struct acl_condvar_s *C, unsigned timeout_period) {
int my_entry_q;
int timed_out = 0;
unsigned int timed_out = 0;
if (!C)
return -1;

Expand Down Expand Up @@ -449,7 +449,7 @@ int acl_timed_wait_condvar(struct acl_condvar_s *C, unsigned timeout_period) {
}

// Still have the waiter mutex!
return timed_out;
return (int)timed_out;
}

// Wait on the condition variable, then release the mutex.
Expand Down

0 comments on commit e21bb5c

Please sign in to comment.