Fix MISRA violations for Kernel release V11.2.0 (#1251)

* Fix MISRA violations for Kernel release V11.2.0

* Fix formatting

* Remove redundant configASSERT in timers.c
This commit is contained in:
Rahul Kar 2025-02-28 17:10:08 +05:30 committed by GitHub
parent df0aa5a815
commit 3fd7f174db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 126 additions and 116 deletions

View file

@ -513,7 +513,10 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
/* Check for multiplication overflow. */
( ( SIZE_MAX / uxQueueLength ) >= uxItemSize ) &&
/* Check for addition overflow. */
( ( SIZE_MAX - sizeof( Queue_t ) ) >= ( size_t ) ( uxQueueLength * uxItemSize ) ) )
/* MISRA Ref 14.3.1 [Configuration dependent invariant] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-143. */
/* coverity[misra_c_2012_rule_14_3_violation] */
( ( SIZE_MAX - sizeof( Queue_t ) ) >= ( size_t ) ( ( size_t ) uxQueueLength * ( size_t ) uxItemSize ) ) )
{
/* Allocate enough space to hold the maximum number of items that
* can be in the queue at any time. It is valid for uxItemSize to be