Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
#define CUBE(X) ((X) * (X) * (X))
int i = 3;
int a = 81 / CUBE(i);

Risk Assessment

Failing to parenthesize around a macro can result in unexpected arithmetic results.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

PRE02-A

1 (low)

1 (unlikely)

3 (low)

P3

L3

...