mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
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:
parent
df0aa5a815
commit
3fd7f174db
5 changed files with 126 additions and 116 deletions
5
queue.c
5
queue.c
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue