Skip to content

Commit

Permalink
event: Add some casts to prevent warnings from MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Jan 17, 2024
1 parent 5a5f8a8 commit ceff72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mcfgthread/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ _MCF_event_get(const _MCF_event* __event) __MCF_NOEXCEPT
{
_MCF_event __temp;
_MCF_atomic_load_pptr_rlx(&__temp, __event);
return __temp.__value;
return (uint8_t) __temp.__value;
}

__MCF_EVENT_INLINE
Expand All @@ -127,7 +127,7 @@ _MCF_event_await_change(_MCF_event* __event, int __undesired, const int64_t* __t
/* Check whether the event does not contain the undesired value. If so,
* don't block at all. */
if(__old.__value != (uint8_t) __undesired)
return __old.__value;
return (uint8_t) __old.__value;

if(__timeout_opt && (*__timeout_opt == 0))
return -1;
Expand Down

0 comments on commit ceff72d

Please sign in to comment.