Skip to content
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

Fix MISRA C 2012 deviations #165

Merged
merged 8 commits into from
Mar 14, 2024

Conversation

chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Mar 5, 2024

Description

Fix MISRA C 2012 deviations

In this PR:

  • Adding "UNITTEST" and "COV_ANALYSIS" to align FreeRTOS libraries design
  • Fix rule 12.3 not to use comma operator
  • Fix rule 13.4 not to use the returned value of the assignment operator
  • Fix rule 17.7 for unused return value
  • Fix rule 18.4 not to use arithmetic on pointer type
  • Fix rule 2.2 to remove overwritten initialized value
  • Fix forward NULL warning

Test Steps

Build coverity_analysis project with coverity 2023.6.1 should show no MISRA deviations.

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.

@chinglee-iot chinglee-iot force-pushed the fix-misra-deviations branch from 6966900 to 74f06fb Compare March 5, 2024 10:25
@chinglee-iot chinglee-iot requested a review from ActoryOu March 7, 2024 06:57
ActoryOu
ActoryOu previously approved these changes Mar 7, 2024
source/cellular_pktio.c Outdated Show resolved Hide resolved
moninom1
moninom1 previously approved these changes Mar 14, 2024
@chinglee-iot chinglee-iot merged commit 71d6f60 into FreeRTOS:main Mar 14, 2024
10 checks passed
@chinglee-iot chinglee-iot deleted the fix-misra-deviations branch March 14, 2024 06:21
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.

3 participants