By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Correcting MISRA C-language Code violations

P: 5
is there anyone who is able to correct c-code MISRA violations in source code - either manually or via some tool?
Nov 7 '15 #1

✓ answered by donbock

It is not my nature to trust tools that modify my source code. My inclination would be to resolve the problems manually. Besides, some of the MISRA rules are more applicable to design than to coding.

You don't necessarily need to make all of the LDRA warnings go away. Part of MISRA compliance is a tailoring document that precisely describes the extent to which your code complies with the MISRA standard.

Share this Question
Share on Google+
7 Replies


P: 5
I have been using LDRA to identify the MISRA violations. Now I am looking for a tool to actually fix them so i get zero violations. I dont know if something like that exists or if there is someone who could correct them faster than I can. Thanks
Nov 8 '15 #3

Expert 100+
P: 2,400
It is not my nature to trust tools that modify my source code. My inclination would be to resolve the problems manually. Besides, some of the MISRA rules are more applicable to design than to coding.

You don't necessarily need to make all of the LDRA warnings go away. Part of MISRA compliance is a tailoring document that precisely describes the extent to which your code complies with the MISRA standard.
Nov 9 '15 #4

P: 5
I am probably going to have to take exception to some of the violations
Nov 9 '15 #5

P: 5
Auto-changes to the code would be risky and would amount to design changes.
Nov 9 '15 #6

Expert 100+
P: 2,400
I'm not familiar with LDRA. Can you tailor it so that it doesn't complain about MISRA-C violations that you have decided to allow?
Nov 9 '15 #7

P: 5
Yes we have a way to exclude some sections of code from the LDRA analysis - these are areas that are intrinsic to the design and if modified could introduce subtle errors. The code has already been through some lab test. The rules applied are a mix of MISRA standards and other coding standards.
Nov 9 '15 #8

Post your reply

Sign in to post your reply or Sign up for a free account.