From fd0123a7ef34fd81edfd160ced9f2db835d9bee5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 26 Sep 2025 16:49:00 -0500 Subject: [PATCH] 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. --- cpukit/include/rtems/rtems/timerimpl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/include/rtems/rtems/timerimpl.h b/cpukit/include/rtems/rtems/timerimpl.h index 6ddeec220a..a66c4a2285 100644 --- a/cpukit/include/rtems/rtems/timerimpl.h +++ b/cpukit/include/rtems/rtems/timerimpl.h @@ -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;