forked from Imagelibrary/rtems
score: Silence integer conversion warnings
This commit is contained in:
@@ -61,7 +61,8 @@ RTEMS_INLINE_ROUTINE unsigned int _Bitfield_Find_first_bit(
|
||||
#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
|
||||
_CPU_Bitfield_Find_first_bit( value, bit_number );
|
||||
#elif defined(__GNUC__)
|
||||
bit_number = __builtin_clz( value ) - __SIZEOF_INT__ * __CHAR_BIT__ + 16;
|
||||
bit_number = (unsigned int) __builtin_clz( value )
|
||||
- __SIZEOF_INT__ * __CHAR_BIT__ + 16;
|
||||
#else
|
||||
if ( value < 0x100 ) {
|
||||
bit_number = _Bitfield_Leading_zeros[ value ] + 8;
|
||||
|
||||
@@ -749,7 +749,7 @@ RTEMS_INLINE_ROUTINE Objects_Id _Scheduler_Build_id( uint32_t scheduler_index )
|
||||
OBJECTS_FAKE_OBJECTS_API,
|
||||
OBJECTS_FAKE_OBJECTS_SCHEDULERS,
|
||||
_Objects_Local_node,
|
||||
scheduler_index + 1
|
||||
(uint16_t) ( scheduler_index + 1 )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Timestamp_Get_nanoseconds(
|
||||
|
||||
bintime2timespec( _time, &_ts );
|
||||
|
||||
return _ts.tv_nsec;
|
||||
return (uint32_t) _ts.tv_nsec;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -318,7 +318,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Ticks_from_timespec(
|
||||
_Assert( ts->tv_nsec < 1000000000 );
|
||||
|
||||
ticks <<= WATCHDOG_BITS_FOR_1E9_NANOSECONDS;
|
||||
ticks |= ts->tv_nsec;
|
||||
ticks |= (uint32_t) ts->tv_nsec;
|
||||
|
||||
return ticks;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user