MISRA 17.12 fixes, justifications for other reporting issues.#1372
Open
kstribrnAmzn wants to merge 10 commits intoFreeRTOS:mainfrom
Open
MISRA 17.12 fixes, justifications for other reporting issues.#1372kstribrnAmzn wants to merge 10 commits intoFreeRTOS:mainfrom
kstribrnAmzn wants to merge 10 commits intoFreeRTOS:mainfrom
Conversation
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
96ed994 to
48fe80a
Compare
|
| configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength ); | ||
|
|
||
| if( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength ) | ||
| if( ( pxQueueSetContainer != NULL ) && ( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength ) ) |
Member
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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:
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.