I posted a query on stack overflow with sample code, but did not get any response there. Can you confirm if this is expected behaviour, or is there a way to work around this?
Is it just that cppcheck does not look in to how the called function is using the pointer, and rather relies on the data in .cfg file for deciding that? I can see how tracking the usage of a pointer across multiple functions can be complicated and performance heavy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I posted a query on stack overflow with sample code, but did not get any response there. Can you confirm if this is expected behaviour, or is there a way to work around this?
https://stackoverflow.com/q/78845892/165297
Is it just that cppcheck does not look in to how the called function is using the pointer, and rather relies on the data in .cfg file for deciding that? I can see how tracking the usage of a pointer across multiple functions can be complicated and performance heavy.