[C-safe-secure-studygroup] MISRA rule 2.1 and rule 3.2
Jill Britton
jill_britton at programmingresearch.com
Wed Feb 22 14:03:16 UTC 2017
Rule 2.1 - A project shall not contain unreachable code
Q1: Can violations of the rule directly threat safety and security?
A1: No
Unreachable code cannot be executed and may be there to handle exception cases
Q2: Can violations of the rule indirectly threat safety and security?
A2: Yes
Unreachable code may be an indication of an error in the code logic
Q3: Should an analyzer be able to detect violations of the rule?
A3: Yes
Rule 3.2 - Line-splicing shall not be used in // comments
Line splicing (\ followed by a new line character) may result in unintentional removal of code if used within a // comment
The comment will continue until the end of the next line
Q1: Can violations of the rule directly threat safety and security?
A1: Yes
Q2: Can violations of the rule indirectly threat safety and security?
A2: Yes
Q3: Should an analyzer be able to detect violations of the rule?
A3: Yes
Regards
Jill Britton
---------------------------------------------------------------------------------------
This email has been scanned for email related threats and delivered safely by Mimecast.
For more information please visit http://www.mimecast.com
---------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.trustable.io/pipermail/c-safe-secure-studygroup/attachments/20170222/16276261/attachment.html>
More information about the C-safe-secure-studygroup
mailing list