The analyzer has detected a commented code fragment that alters the program execution logic.
The example:
function foo(isCanceled, formatter) {
if (isCanceled)
//bar(); // <=
if (formatter)
free(formatter);
}
After the comment on the call to the bar function, the second if statement is now related to the then branch of the first if statement. The reason for this may be poor refactoring, as the source code structure no longer aligns with the program execution logic.
To avoid the error, either delete the unused code or properly comment it out:
function foo(isCanceled, formatter) {
// if (isCanceled)
// bar();
if (formatter)
free(formatter);
}
If the program behavior mentioned above is intended, fix the formatting so that it matches the program execution logic:
function foo(isCanceled, formatter) {
if (isCanceled)
//bar();
if (formatter)
free(formatter);
}
This diagnostic is classified as:
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: