Synopsis: | Do not apply sizeof to an expression with side-effects |
Language: | C++ |
Severity Level: | 1 |
Category: | Control Flow |
Description: |
The operand of sizeof is not evaluated, so any intended side-effects will not occur. Example: size_t Size = sizeof(nCount++); // Wrong: nCount not changed! |