Recommendations
EXP00-C. Use parentheses for precedence of operation
EXP01-C. Do not take the size of a pointer to determine the size of the pointed-to type
EXP02-C. Be aware of the short-circuit behavior of the logical AND and OR operators
EXP03-C. Do not assume the size of a structure is the sum of the sizes of its members
EXP04-C. Do not perform byte-by-byte comparisons involving a structure
EXP05-C. Do not cast away a const qualification
EXP06-C. Operands to the sizeof operator should not contain side effects
EXP07-C. Do not diminish the benefits of constants by assuming their values in expressions
EXP08-C. Ensure pointer arithmetic is used correctly
EXP09-C. Use sizeof to determine the size of a type or variable
EXP11-C. Do not apply operators expecting one type to data of an incompatible type
EXP12-C. Do not ignore values returned by functions
EXP13-C. Treat relational and equality operators as if they were nonassociative
EXP14-C. Beware of integer promotion when performing bitwise operations on chars or shorts
EXP15-C. Do not place a semicolon on the same line as an if, for, or while statement
EXP16-C. Do not compare function pointers to constant values
EXP17-C. Do not perform bitwise operations in conditional expressions
EXP18-C. Do not perform assignments in conditional expressions
Rules
EXP30-C. Do not depend on order of evaluation between sequence points
EXP31-C. Avoid side effects in assertions
EXP32-C. Do not access a volatile object through a non-volatile reference
EXP33-C. Do not reference uninitialized memory
EXP34-C. Do not dereference null pointers
EXP36-C. Do not convert pointers into more strictly aligned pointer types
EXP37-C. Call functions with the arguments intended by the API
EXP38-C. Do not call offsetof() on bit-field members or invalid types
EXP39-C. Do not access a variable through a pointer of an incompatible type
...
| Content by Label | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Info |
|---|
Information for Editors |
Rules
| Content by Label | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| Info |
|---|
Information for Editors |
Risk Assessment Summary
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
EXP00-C | low | probable | medium | P4 | L3 |
EXP01-C | high | probable | medium | P12 | L1 |
EXP02-C | low | unlikely | medium | P2 | L3 |
EXP03-C | medium | unlikely | high | P2 | L3 |
EXP04-C | medium | unlikely | high | P2 | L3 |
EXP05-C | medium | probable | medium | P8 | L2 |
EXP06-C | low | unlikely | low | P3 | L3 |
EXP07-C | low | unlikely | medium | P2 | L3 |
EXP08-C | high | probable | high | P6 | L2 |
EXP09-C | high | unlikely | medium | P6 | L2 |
EXP10-C | medium | probable | medium | P8 | L2 |
EXP11-C | medium | probable | medium | P8 | L2 |
EXP12-C | medium | unlikely | medium | P4 | L3 |
...