-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[BUG] Violation of MISRA2012 rule 17.11 - A function that never returns should be declared with a _Noreturn function specifier #1057
Comments
Hi @markhermeling Thanks. |
Hi @markhermeling Thanks. |
I have another couple of issues to report. Looking for suggestions from the team as to how to approach. What I would like to do is to submit a codesonar example and make a PR with that and suggested code changes if that is easiest. I can also add CodeSonar either to the pipeline in the repo, or run it once per day and publish the results. |
We recently started running sonarcube experimentally but it is not tied to PR checks and we may have different configurations. The easiest path may be submitting a PR with a test run and your changes. Then we can directly comment on the proposed changes and discuss any configuration differences. |
Looks like the kernel is doing sonar checks in the PR. This PR shows the result. |
We have linked Code Sonar here - https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/.github/third_party_tools.md. |
Describe the bug
In the Coverity example configuration there are 4 places where a function is used that does not return. See the attached SARIF file from a run with CodeSecure CodeSonar. This is a violation of MISRA 17.11, though admittedly not a key rule.
Target
Host
To Reproduce
Expected behavior
The specified functions should be defined with _Noreturn, or rule 17.11 should be added as a deviation. I am happy to provide a PR with either of these done, but wanted to file the issue first to understand what the project prefers.
I am working on a few more MISRA violation as it seems that Coverity missed a few rules. Once done, I plan to submit a codesonar example project as well to make it easier for users to run CodeSonar on FreeRTOS.
Misra17-11-violations.sarif.zip
The text was updated successfully, but these errors were encountered: