Skip to content

Comments

MISRA 17.12 fixes, justifications for other reporting issues.#1372

Open
kstribrnAmzn wants to merge 10 commits intoFreeRTOS:mainfrom
kstribrnAmzn:misraFix
Open

MISRA 17.12 fixes, justifications for other reporting issues.#1372
kstribrnAmzn wants to merge 10 commits intoFreeRTOS:mainfrom
kstribrnAmzn:misraFix

Conversation

@kstribrnAmzn
Copy link
Member

@kstribrnAmzn kstribrnAmzn commented Feb 20, 2026

Description

Fix MISRA 17.12 violations by making explicit the callback function usage callback pattern.

Provide justification for leaving the other violations unsuppressed. Most are not considered kernel implementation or should go away with a valid port implementation.

Test Steps

Ran coverity scan

Checklist:

  • I have tested my changes. No regression in existing tests.
  • [] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

None

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Adds an explicit null check before
accessing the messages waiting. This
matches the assertions above.
This is expected from the portable header as it is
implemented by the port.
Deviations which are unsupressed should be
documented for user awareness.
This is required to disambiguate a function call and a
function to-be called
@sonarqubecloud
Copy link

@kstribrnAmzn kstribrnAmzn changed the title MISRA 4.12 fixes, justifications for other reporting issues. MISRA 17.12 fixes, justifications for other reporting issues. Feb 20, 2026
@kstribrnAmzn kstribrnAmzn marked this pull request as ready for review February 20, 2026 22:33
configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength );

if( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength )
if( ( pxQueueSetContainer != NULL ) && ( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength ) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this check necessary? ( pxQueueSetContainer != NULL )
I don't have an issue with this check, but wherever this static function is called, we are already checking this condition to be not true. Why was this deviation flagged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants