Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchinglee-iot <61685396+chinglee-iot@users.noreply.github.com>2023-11-28 16:34:29 +0300
committerGitHub <noreply@github.com>2023-11-28 16:34:29 +0300
commitdabbc05a39977e1d414b9885f5ee4f8c32c74691 (patch)
tree3c403dab3693eab8696c91a55875f1ebaad4d5e1 /event_groups.c
parentf2637bae55405b11c8ea80e919bfab16ef4dd26b (diff)
Suppress MISRA C rule 11.3 in MISRA.md (#857)
Suppress MISRA C rule 11.3 in MISRA.md
Diffstat (limited to 'event_groups.c')
-rw-r--r--event_groups.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/event_groups.c b/event_groups.c
index 556637b4c..e6fc7e68c 100644
--- a/event_groups.c
+++ b/event_groups.c
@@ -98,7 +98,10 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
#endif /* configASSERT_DEFINED */
/* The user has provided a statically allocated event group - use it. */
- pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer; /*lint !e740 !e9087 EventGroup_t and StaticEventGroup_t are deliberately aliased for data hiding purposes and guaranteed to have the same size and alignment requirement - checked by configASSERT(). */
+ /* 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] */
+ pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer;
if( pxEventBits != NULL )
{
@@ -710,6 +713,9 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
/* Check if the event group was statically allocated. */
if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdTRUE )
{
+ /* 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] */
*ppxEventGroupBuffer = ( StaticEventGroup_t * ) pxEventBits;
xReturn = pdTRUE;
}
@@ -721,6 +727,9 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
#else /* configSUPPORT_DYNAMIC_ALLOCATION */
{
/* Event group must have been statically allocated. */
+ /* 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] */
*ppxEventGroupBuffer = ( StaticEventGroup_t * ) pxEventBits;
xReturn = pdTRUE;
}