...
Wiki Markup |
---|
Using the {{sizeof}} expression in this example reduces the total number of names declared in the program, which is generally a good idea \[[Saks 02|AA. C References#Saks 02]\]. The {{sizeof}} operator is almost always evaluated at compile time (except in the case of variable length arrays). |
Wiki Markup |
---|
When working with {{sizeof()}}, keep in mind \[[ARR01-A. Do not apply the sizeof operator to an incomplete type]\]. |
Non-Compliant Code Example
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL06-A | 1 ( low ) 1 ( | unlikely ) | 2 ( medium ) | P2 | L3 |
Automated Detection
The LDRA tool suite V 7.6.0 is able to detect violations of this recommendation.
...