However the client call a non-const method on the service. Note that when I remove the "ClientWrapper" nad use just the "Client", the warning disappears.
Note that this is only a sample, real service can really do something which requires to have the method non-const - e.g. store something to a database.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I didn't want to struggle with creating the track account. I've simple sample of the code firing a false positivy style warning [constParameter ].
The following code fires (using cppcheck-1.90):
However the client call a non-const method on the service. Note that when I remove the "ClientWrapper" nad use just the "Client", the warning disappears.
test.cpp:
Note that this is only a sample, real service can really do something which requires to have the method non-const - e.g. store something to a database.
It seems that the example above has been fixed in 2.1. However here is a different one (the non-const overload of GetBuffer() gets called on Dst):
bump
Can anyone verify this? Maybe I should have started a new thread...
Thanks! I can reproduce. I created ticket https://trac.cppcheck.net/ticket/9910