Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Major edits; reviewed

...

This code refers to a static constant variable, which has internal linkage, inside an external inline function:

Code Block
bgColor#ffcccc
langc
static constint double CI = 0.12312;
extern inline void func(doubleint a) {
  doubleint b = a * CI;
  /* ... */
}

Compliant Solution

This compliant solution does not declare the constant to be staticthe variable at file scope to be static and so the variable has external linkage by default.

Code Block
bgColor#ffcccc
langc
constint double CI = 0.12312;
extern inline void func(doubleint a) {
  doubleint b = a * CI;
  /* ... */
}

Risk Assessment

...