mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
cpukit/include/rtems/rtems/timerimpl.h: Used unsigned type for mask
This addresses an issue found by the GCC -Wsign-compare warning. The code was using a signed type for a bit mask.
This commit is contained in:
1 parent
bf949e0526
commit
fd0123a7ef
1 file changed
+2
-2
@@ -138,7 +138,7 @@ static inline bool _Timer_Is_interval_class(
|
||||
Timer_Classes the_class
|
||||
)
|
||||
{
|
||||
int mask;
|
||||
uint32_t mask;
|
||||
|
||||
mask = TIMER_CLASS_BIT_NOT_DORMANT | TIMER_CLASS_BIT_TIME_OF_DAY;
|
||||
return ( the_class & mask ) == TIMER_CLASS_BIT_NOT_DORMANT;
|
||||
@@ -148,7 +148,7 @@ static inline bool _Timer_Is_on_task_class(
|
||||
Timer_Classes the_class
|
||||
)
|
||||
{
|
||||
int mask;
|
||||
uint32_t mask;
|
||||
|
||||
mask = TIMER_CLASS_BIT_NOT_DORMANT | TIMER_CLASS_BIT_ON_TASK;
|
||||
return ( the_class & mask ) == mask;
|
||||
|
||||
Reference in new issue
Block a user