Inconsistent operation on return value¶
ID: cpp/inconsistent-call-on-result Kind: problem Severity: warning Precision: medium Tags: - reliability - correctness - statistical - non-attributable - external/cwe/cwe-252 Query suites: - cpp-security-and-quality.qls
If the same operation (e.g.
close, etc.) is usually performed on the result of a method call, then any instances where it is not performed may indicate misuse of the API and could cause resource leaks or other issues.
Examine the code to determine if the return value is treated correctly in this particular case.