hey i got some "false positives" about 17.3 in my code as i only included the header with <>, which is on purpose as they are headers from the infineon hardware abstraction layer which have many violations. and i dont want to check them.
But then i analysed further and found that this error only occurs if the function is called within a if(..) statement.
then i checked the misra plugin and found that only if the call is within a while or if condition the violation can occur. is there a specific purpose for that. i dont think the rule itself requires that. A call of the method infront of the if statement would not cause a violation and therefore a false negative.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hey i got some "false positives" about 17.3 in my code as i only included the header with <>, which is on purpose as they are headers from the infineon hardware abstraction layer which have many violations. and i dont want to check them.
But then i analysed further and found that this error only occurs if the function is called within a if(..) statement.
then i checked the misra plugin and found that only if the call is within a while or if condition the violation can occur. is there a specific purpose for that. i dont think the rule itself requires that. A call of the method infront of the if statement would not cause a violation and therefore a false negative.