From a8b884fb470b8cf3bea3ca891863ef7a202b591b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 19 Apr 2024 08:25:27 +0000 Subject: [PATCH] Fix the constant suffix to U --- include/event_groups.h | 24 ++++++++++++------------ portable/template/portmacro.h | 6 +++--- tasks.c | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/event_groups.h b/include/event_groups.h index 09a5ab53a..1461a1113 100644 --- a/include/event_groups.h +++ b/include/event_groups.h @@ -40,20 +40,20 @@ * item value. It is important they don't clash with the * taskEVENT_LIST_ITEM_VALUE_IN_USE definition. */ #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) - #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint16_t ) 0x0100 ) - #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint16_t ) 0x0200 ) - #define eventWAIT_FOR_ALL_BITS ( ( uint16_t ) 0x0400 ) - #define eventEVENT_BITS_CONTROL_BYTES ( ( uint16_t ) 0xff00 ) + #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint16_t ) 0x0100U ) + #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint16_t ) 0x0200U ) + #define eventWAIT_FOR_ALL_BITS ( ( uint16_t ) 0x0400U ) + #define eventEVENT_BITS_CONTROL_BYTES ( ( uint16_t ) 0xff00U ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) - #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint32_t ) 0x01000000 ) - #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint32_t ) 0x02000000 ) - #define eventWAIT_FOR_ALL_BITS ( ( uint32_t ) 0x04000000 ) - #define eventEVENT_BITS_CONTROL_BYTES ( ( uint32_t ) 0xff000000 ) + #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint32_t ) 0x01000000U ) + #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint32_t ) 0x02000000U ) + #define eventWAIT_FOR_ALL_BITS ( ( uint32_t ) 0x04000000U ) + #define eventEVENT_BITS_CONTROL_BYTES ( ( uint32_t ) 0xff000000U ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) - #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint64_t ) 0x0100000000000000 ) - #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint64_t ) 0x0200000000000000 ) - #define eventWAIT_FOR_ALL_BITS ( ( uint64_t ) 0x0400000000000000 ) - #define eventEVENT_BITS_CONTROL_BYTES ( ( uint64_t ) 0xff00000000000000 ) + #define eventCLEAR_EVENTS_ON_EXIT_BIT ( ( uint64_t ) 0x0100000000000000U ) + #define eventUNBLOCKED_DUE_TO_BIT_SET ( ( uint64_t ) 0x0200000000000000U ) + #define eventWAIT_FOR_ALL_BITS ( ( uint64_t ) 0x0400000000000000U ) + #define eventEVENT_BITS_CONTROL_BYTES ( ( uint64_t ) 0xff00000000000000U ) #endif /* if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) */ /* *INDENT-OFF* */ diff --git a/portable/template/portmacro.h b/portable/template/portmacro.h index 3b5da0dd2..90668043c 100644 --- a/portable/template/portmacro.h +++ b/portable/template/portmacro.h @@ -34,13 +34,13 @@ typedef unsigned char UBaseType_t; #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) typedef uint16_t TickType_t; - #define portMAX_DELAY ( TickType_t ) 0xffff + #define portMAX_DELAY ( TickType_t ) 0xffffU #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) typedef uint32_t TickType_t; - #define portMAX_DELAY ( TickType_t ) 0xffffffffUL + #define portMAX_DELAY ( TickType_t ) 0xffffffffU #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) typedef uint64_t TickType_t; - #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffff + #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffU #else #error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width. #endif diff --git a/tasks.c b/tasks.c index 8d2daf736..35350fb63 100644 --- a/tasks.c +++ b/tasks.c @@ -291,11 +291,11 @@ * responsibility of whichever module is using the value to ensure it gets set back * to its original value when it is released. */ #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS ) - #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint16_t ) 0x8000 ) + #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint16_t ) 0x8000U ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) - #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint32_t ) 0x80000000 ) + #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint32_t ) 0x80000000U ) #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) - #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint64_t ) 0x8000000000000000 ) + #define taskEVENT_LIST_ITEM_VALUE_IN_USE ( ( uint64_t ) 0x8000000000000000U ) #endif /* Indicates that the task is not actively running on any core. */