...
This code refers to a static constant variable, which has internal linkage, inside an external inline function:
| Code Block | ||||
|---|---|---|---|---|
| ||||
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 | ||||
|---|---|---|---|---|
| ||||
constint double CI = 0.12312; extern inline void func(doubleint a) { doubleint b = a * CI; /* ... */ } |
Risk Assessment
...