-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress MISRA C rule 11.3 in MISRA.md #857
Conversation
* FreeRTOS supports static allocation. Suppress this rule to allow conversion of static structure type to internal structure type.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #857 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 6 6
Lines 3179 3179
Branches 885 885
=======================================
Hits 2977 2977
Misses 95 95
Partials 107 107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Suppress MISRA C rule 11.3 in MISRA.md
Description
MISRA C:2012 Rule 11.3
MISRA violation
The rule requires not to cast a pointer to object into a pointer to a different object to prevent undefined behavior due to incorrectly aligned. To support static memory allocation,
FreeRTOS creates static type kernel objects which are aliases for kernel object type with prefix "Static" for data hiding purpose. A static kernel object type is guaranteed to have the same size and alignment with kernel object, which is checked by configASSERT. Static kernel object types include StaticEventGroup_t, StaticQueue_t, StaticStreamBuffer_t, StaticTimer_t and StaticTask_t.
The following is one of the violation example:
Suppress in the PR
Test Steps
N/A
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
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.