473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Correcting MISRA C-language Code violations

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.

7 1827
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
donbock
2,426 Expert 2GB
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
I am probably going to have to take exception to some of the violations
Nov 9 '15 #5
Auto-changes to the code would be risky and would amount to design changes.
Nov 9 '15 #6
donbock
2,426 Expert 2GB
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
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

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

Similar topics

34
by: Chris Hills | last post by:
MISRA is looking at doing a MISRA-C++ This is because they were asked to do it by a lot of people in industry. They are looking for some people to make up the team (based in the UK) The team...
5
by: hammer1234 | last post by:
Hello I would like to create a test case that violates the following MISRA C:2004 rule . Misra Rule 18.2. An object shall not be assigned to an overlapping object. "The behaviour is...
1
by: srinivasarv | last post by:
Dear Friends, kindly help me in correcting the following code This code is for printing the report from the combo box after selection which connects to different reports as selected. I have...
18
by: Chris Hills | last post by:
The MISRA-C team has to make a decision: should it move from Referencing C95 (9899:1990+A1+RC1+TC2) to referencing C99 for the next MISRA-C (version 3) In the real world (especially embedded,...
6
by: Ark Khasin | last post by:
MISRA came up with those "underlying types" of sub-int size (like likely char and perhaps short) and the whole arithmetic on them. Basically, I need to continually cast back to the "underlying"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.