Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider $version (sch jbop) (X_X)@==(Q_Q)@

Recommendations

EXP00-AC. Use parentheses for precedence of operation

EXP01-AC. Do not take the size of a pointer to determine the size of the pointed-to type

EXP02-AC. Be aware of the short-circuit behavior of the logical AND and OR operators

EXP03-AC. Do not assume the size of a structure is the sum of the sizes of its members

EXP04-AC. Do not perform byte-by-byte comparisons between structures

EXP05-AC. Do not cast away a const qualification

EXP06-AC. Operands to the sizeof operator should not contain side effects

EXP07-AC. Do not diminish the benefits of constants by assuming their values in expressions

EXP08-AC. Ensure pointer arithmetic is used correctly

EXP09-AC. Use sizeof to determine the size of a type or variable

EXP10-AC. Do not depend on the order of evaluation of subexpressions or the order in which side effects take place

EXP11-AC. Do not apply operators expecting one type to data of an incompatible type

EXP12-AC. Do not ignore values returned by functions

Rules

EXP30-C. Do not depend on order of evaluation between sequence points

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP00-A C

low

probable

medium

P4

L3

EXP01-A C

high

probable

medium

P12

L1

EXP02-A C

low

unlikely

medium

P2

L3

EXP03-A C

medium

unlikely

high

P2

L3

EXP04-A C

medium

unlikely

high

P2

L3

EXP05-A C

medium

probable

medium

P8

L2

EXP06-A C

low

unlikely

low

P3

L3

EXP07-A C

low

unlikely

medium

P2

L3

EXP08-A C

high

probable

high

P6

L2

EXP09-A C

high

unlikely

medium

P6

L2

EXP10-A C

medium

probable

medium

P8

L2

EXP11-A C

medium

probable

medium

P8

L2

EXP12-A C

medium

unlikely

medium

P4

L3

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP30-C

medium

probable

medium

P8

L2

EXP31-C

low

unlikely

low

P3

L3

EXP32-C

low

likely

medium

P6

L2

EXP33-C

high

probable

medium

P12

L1

EXP34-C

high

likely

medium

P18

L1

EXP35-C

low

probable

medium

P4

L3

EXP36-C

low

probable

medium

P4

L3

EXP37-C

medium

probable

high

P4

L3

EXP38-C

low

unlikely

medium

P2

L3

...

      02. Declarations and Initialization (DCL)       EXP00-A. Use parentheses for precedence of operation Image Added