In this form, CFLint will complain with this message “Local variable someoutput is not used in function testLocalVariable. Consider removing it ( UNUSED_LOCAL_VARIABLE )”. OK, let’s do that.
But when you delete the line that defines the local variable, you’ll get another error message, saying “Variable someoutput is not declared with a var statement ( MISSING_VAR )”.
So in the second situation it will detect the fact that ‘someoutput’ is a local variable, while that’s not the case in the first. Strange, yes. A bug ? Possibly…
Here’s a tiny component to demonstrate what I consider to be an inconsistency in CFLint.
In this form, CFLint will complain with this message “
Local variable someoutput is not used in function testLocalVariable. Consider removing it ( UNUSED_LOCAL_VARIABLE )
”. OK, let’s do that.But when you delete the line that defines the local variable, you’ll get another error message, saying “
Variable someoutput is not declared with a var statement ( MISSING_VAR )
”.So in the second situation it will detect the fact that ‘someoutput’ is a local variable, while that’s not the case in the first. Strange, yes. A bug ? Possibly…