...
According to the C Standard, Section subclause 5.1.1.3 [ISO/IEC 9899:2011],
A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined. Diagnostic messages need not be produced in other circumstances.
Assuming a conforming implementation, eliminating diagnostic messages will eliminate any syntactic or constraint violations.
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MSC00-C | mediumMedium | probableProbable | mediumMedium | P8 | L2 |
Related Vulnerabilities
Search for for vulnerabilities resulting from the violation of this rule on the CERT website.
...
CERT C++ Secure Coding Standard | MSC00-CPP. Compile cleanly at high warning levels |
MITRE CWE | CWE-563, Unused variable CWE-570, Expression is always false CWE-571, Expression is always true |
Bibliography
[ISO/IEC 9899:2011] | Section 5.1.1.3, "Diagnostics" |
[Seacord 2013] | Chapter 9, "Recommended Practices" |
[Sutter 2005] | Item 1 |
...