mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Suppress MISRA C rule 11.3 in MISRA.md (#857)
Suppress MISRA C rule 11.3 in MISRA.md
This commit is contained in:
parent
f2637bae55
commit
dabbc05a39
6 changed files with 62 additions and 7 deletions
8
queue.c
8
queue.c
|
@ -408,7 +408,10 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
/* The address of a statically allocated queue was passed in, use it.
|
||||
* The address of a statically allocated storage area was also passed in
|
||||
* but is already set. */
|
||||
pxNewQueue = ( Queue_t * ) pxStaticQueue; /*lint !e740 !e9087 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */
|
||||
/* MISRA Ref 11.3.1 [Misaligned access] */
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
|
||||
/* coverity[misra_c_2012_rule_11_3_violation] */
|
||||
pxNewQueue = ( Queue_t * ) pxStaticQueue;
|
||||
|
||||
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||
{
|
||||
|
@ -459,6 +462,9 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
|
|||
*ppucQueueStorage = ( uint8_t * ) pxQueue->pcHead;
|
||||
}
|
||||
|
||||
/* MISRA Ref 11.3.1 [Misaligned access] */
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
|
||||
/* coverity[misra_c_2012_rule_11_3_violation] */
|
||||
*ppxStaticQueue = ( StaticQueue_t * ) pxQueue;
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue