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 Rule 14.4 Violations. #975

Merged
merged 7 commits into from
Feb 2, 2024

Conversation

bradleysmith23
Copy link
Contributor

Description

MISRA rule 14.4 - The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially boolean type.

  • macro listLIST_IS_EMPTY() returns pdTrue or pdFalse which are not of the essentially bool type (_Bool). By comparing the value it returns against 0, the expression evaluates to essentially boolean type.

Test Steps

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.

@bradleysmith23 bradleysmith23 requested a review from a team as a code owner January 31, 2024 23:44
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b4da9e3) 93.65% compared to head (c70a4ae) 93.62%.
Report is 2 commits behind head on main.

Files Patch % Lines
tasks.c 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
- Coverage   93.65%   93.62%   -0.03%     
==========================================
  Files           6        6              
  Lines        3198     3199       +1     
  Branches      886      886              
==========================================
  Hits         2995     2995              
- Misses         91       92       +1     
  Partials      112      112              
Flag Coverage Δ
unittests 93.62% <80.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tasks.c Outdated Show resolved Hide resolved
@bradleysmith23
Copy link
Contributor Author

/bot run formatting

Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bradleysmith23 bradleysmith23 merged commit c19b13c into FreeRTOS:main Feb 2, 2024
16 of 18 checks passed
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.

5 participants